'Generic Commit'
This commit is contained in:
@ -313,18 +313,18 @@ if [ -n "${SOS_WRITE_TOKEN:-}" ]; then
|
||||
print_test_result "Bashrc modifications for PATH and autocomplete" 1
|
||||
fi
|
||||
|
||||
# Test 12: Direct tool name install (shortcut syntax)
|
||||
echo -e "\nTest 12: Direct tool install syntax"
|
||||
# Test 12: Reinstall after manual removal
|
||||
echo -e "\nTest 12: Reinstall after manual removal"
|
||||
# First remove the tool
|
||||
rm -rf ~/.getpkg/"${TEST_TOOL_NAME}"
|
||||
rm -rf ~/.local/bin/getpkg/"${TEST_TOOL_NAME}"
|
||||
rm -f ~/.config/getpkg/"${TEST_TOOL_NAME}.json"
|
||||
|
||||
DIRECT_INSTALL_OUTPUT=$(timeout 3 "$GETPKG" "$TEST_TOOL_NAME" 2>&1) || DIRECT_INSTALL_OUTPUT=""
|
||||
if [[ "$DIRECT_INSTALL_OUTPUT" =~ Installed\ ${TEST_TOOL_NAME}\ successfully ]] || [[ "$DIRECT_INSTALL_OUTPUT" =~ ${TEST_TOOL_NAME}\ is\ already\ up\ to\ date ]]; then
|
||||
print_test_result "Direct tool name install syntax" 0
|
||||
REINSTALL_OUTPUT=$(timeout 3 "$GETPKG" install "$TEST_TOOL_NAME" 2>&1) || REINSTALL_OUTPUT=""
|
||||
if [[ "$REINSTALL_OUTPUT" =~ Installed\ ${TEST_TOOL_NAME}\ successfully ]] || [[ "$REINSTALL_OUTPUT" =~ ${TEST_TOOL_NAME}\ is\ already\ up\ to\ date ]]; then
|
||||
print_test_result "Reinstall after manual removal" 0
|
||||
else
|
||||
print_test_result "Direct tool name install syntax" 1
|
||||
print_test_result "Reinstall after manual removal" 1
|
||||
fi
|
||||
|
||||
# Test 13: Update already installed tool (should say up to date)
|
||||
@ -341,7 +341,7 @@ if [ -n "${SOS_WRITE_TOKEN:-}" ]; then
|
||||
# Skip dependent tests
|
||||
print_test_result "Tool files installed correctly" 1
|
||||
print_test_result "Bashrc modifications for PATH and autocomplete" 1
|
||||
print_test_result "Direct tool name install syntax" 1
|
||||
print_test_result "Reinstall after manual removal" 1
|
||||
print_test_result "Update check recognizes up-to-date tool" 1
|
||||
fi
|
||||
|
||||
@ -352,7 +352,7 @@ if [ -n "${SOS_WRITE_TOKEN:-}" ]; then
|
||||
print_test_result "Install tool from getpkg.xyz" 1
|
||||
print_test_result "Tool files installed correctly" 1
|
||||
print_test_result "Bashrc modifications for PATH and autocomplete" 1
|
||||
print_test_result "Direct tool name install syntax" 1
|
||||
print_test_result "Reinstall after manual removal" 1
|
||||
print_test_result "Update check recognizes up-to-date tool" 1
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user