-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·59 lines (48 loc) · 1.51 KB
/
test.sh
File metadata and controls
executable file
·59 lines (48 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Test script for MenuCLI
# This script demonstrates the basic functionality of the menu tool
echo "MenuCLI Test Script"
echo "==================="
echo ""
# Path to the built executable
MENU_TOOL="./.build/release/menu"
# Check if the tool is built
if [ ! -f "$MENU_TOOL" ]; then
echo "❌ Menu tool not found. Please run ./build.sh first"
exit 1
fi
echo "Testing with Finder (should always be running)..."
echo ""
# Test 1: List menu items
echo "1. Listing Finder menu items:"
echo "------------------------------"
$MENU_TOOL list Finder
echo ""
# Test 2: Check if a menu item exists
echo "2. Checking if 'File > New Finder Window' exists:"
echo "---------------------------------------------------"
$MENU_TOOL check Finder "File > New Finder Window"
echo ""
# Test 3: List with recursive option
echo "3. Listing File menu recursively:"
echo "----------------------------------"
$MENU_TOOL list Finder --recursive | head -20
echo "(truncated for brevity)"
echo ""
# Test 4: Check non-existent menu
echo "4. Checking non-existent menu item:"
echo "------------------------------------"
$MENU_TOOL check Finder "File > Nonexistent Item" || echo " (Expected to fail)"
echo ""
# Test 5: Display help
echo "5. Displaying help:"
echo "-------------------"
$MENU_TOOL --help
echo ""
echo "==================="
echo "Test Complete!"
echo ""
echo "Note: To test clicking functionality, run:"
echo " $MENU_TOOL click Finder \"File > New Finder Window\""
echo ""
echo "Remember to grant accessibility permissions if prompted!"