From 366b160960ca1080ebc988a91ab9dc2472d02327 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 8 May 2026 16:36:46 +0200 Subject: [PATCH] Fix tests --- test/omarchy-cli-test.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/omarchy-cli-test.sh b/test/omarchy-cli-test.sh index 9b9a8dfb..8e9fd341 100644 --- a/test/omarchy-cli-test.sh +++ b/test/omarchy-cli-test.sh @@ -69,8 +69,8 @@ pass "fallback commands are inferred and documented" "$CLI" commands --all --json | jq -e '.commands[] | select(.route == "omarchy dev benchmark")' >/dev/null pass "benchmark command is discoverable in all commands" -"$CLI" commands --json | jq -e '.commands[] | select(.binary == "omarchy-pkg-add" and .route == "omarchy install package" and .filename_route == "omarchy pkg add" and (.routes | index("omarchy pkg add")))' >/dev/null -pass "JSON exposes canonical and filename-derived routes" +"$CLI" commands --json | jq -e '.commands[] | select(.binary == "omarchy-pkg-add" and .route == "omarchy pkg add" and .filename_route == "omarchy pkg add" and (.routes | index("omarchy pkg add")))' >/dev/null +pass "JSON exposes direct pkg add route" "$CLI" commands --json | jq -e '.commands[] | select(.binary == "omarchy-refresh-pacman" and .requires_sudo == true)' >/dev/null pass "sudo metadata marks sudo commands" @@ -79,11 +79,12 @@ output=$("$CLI" theme --help) assert_output_contains "group help renders" "$output" "Theme commands" output=$("$CLI" install --help) -assert_output_contains "install group help renders" "$output" "omarchy install package " +assert_output_contains "install group help renders" "$output" "Install commands" +assert_output_contains "install group includes browser route" "$output" "omarchy install browser" output=$("$CLI" install) assert_output_contains "bare group renders help instead of picker" "$output" "Install commands" -assert_output_contains "bare group includes package route" "$output" "omarchy install package " +assert_output_contains "bare group includes browser route" "$output" "omarchy install browser" output=$("$CLI" toggle) assert_output_contains "bare root command with children renders help" "$output" "Toggle commands" @@ -166,8 +167,8 @@ assert_output_contains "root alias resolves to command help" "$output" "omarchy- pass "aliases are included in JSON metadata" output=$("$CLI" pkg add --help) -assert_output_contains "fallback route resolves to curated metadata" "$output" "omarchy-pkg-add" -assert_output_contains "fallback route shows canonical route" "$output" "omarchy install package " +assert_output_contains "pkg add help resolves" "$output" "omarchy-pkg-add" +assert_output_contains "pkg add help shows direct route" "$output" "omarchy pkg add " output=$("$CLI" system reboot --help) assert_output_contains "system command help is safe" "$output" "omarchy-system-reboot"