docs, test: add config management documentation and tests
This commit is contained in:
@@ -150,6 +150,24 @@ else
|
||||
echo "FAIL (notify.log not created)"
|
||||
fi
|
||||
|
||||
# 8. Config Management
|
||||
it "manages configuration via CLI"
|
||||
mkdir -p "$HOME/.config/color-tool"
|
||||
"$COLOR_TOOL" --reset-config >/dev/null
|
||||
|
||||
# Test --set-config
|
||||
"$COLOR_TOOL" --set-config defaults output=rgba
|
||||
output=$("$COLOR_TOOL" --get-config)
|
||||
if [[ "$output" == *"output = \"rgba\""* ]]; then
|
||||
# Test --reset-config
|
||||
"$COLOR_TOOL" --reset-config >/dev/null
|
||||
output=$("$COLOR_TOOL" --get-config)
|
||||
assert_contains "$output" "output = \"hex\""
|
||||
else
|
||||
echo "FAIL"
|
||||
echo " Expected to find: output = \"rgba\""
|
||||
echo " Actual output: $output"
|
||||
fi
|
||||
|
||||
# 9. JSON Output
|
||||
it "outputs selected formats as JSON"
|
||||
|
||||
Reference in New Issue
Block a user