@@ -76,8 +76,8 @@ validate_ignore_files() {
7676test_ignore_files_option () {
7777 print_message " $BLUE " " \n=== Testing Ignore Files Option ==="
7878
79- # Test 1: --ignore-files option with core installation
80- print_message " $BLUE " " Testing: php install.php --core --ignore-files --yes"
79+ # Test 1: --ignore-files=yes option with core installation
80+ print_message " $BLUE " " Testing: php install.php --core --ignore-files=yes --yes"
8181 local test_dir=" $TEMP_DIR /test_ignore_files"
8282 rm -rf " $test_dir "
8383 mkdir -p " $test_dir "
@@ -89,12 +89,12 @@ test_ignore_files_option() {
8989 fi
9090
9191 cd " $test_dir "
92- php install.php --core --ignore-files --yes > output.log 2>&1
92+ php install.php --core --ignore-files=yes --yes > output.log 2>&1
9393 local exit_code=$?
9494 cd " $BASE_DIR "
9595
9696 if [ $exit_code -ne 0 ]; then
97- print_message " $RED " " ✗ Installation with --ignore-files failed with exit code $exit_code "
97+ print_message " $RED " " ✗ Installation with --ignore-files=yes failed with exit code $exit_code "
9898 print_message " $YELLOW " " Command output:"
9999 cat " $test_dir /output.log"
100100 return 1
@@ -128,63 +128,63 @@ test_ignore_files_option() {
128128
129129 print_message " $GREEN " " ✓ Ignore files have content"
130130
131- # Test 2: Installation without --ignore-files should not install ignore files
132- print_message " $BLUE " " Testing: php install.php --core --yes (without -- ignore-files) "
131+ # Test 2: Installation with --ignore-files=no should not install ignore files
132+ print_message " $BLUE " " Testing: php install.php --core --ignore-files=no --yes "
133133 local test_dir_no_ignore=" $TEMP_DIR /test_no_ignore_files"
134134 rm -rf " $test_dir_no_ignore "
135135 mkdir -p " $test_dir_no_ignore "
136136
137137 get_fresh_installer " $test_dir_no_ignore /install.php"
138138 cd " $test_dir_no_ignore "
139- php install.php --core --yes > output.log 2>&1
139+ php install.php --core --ignore-files=no -- yes > output.log 2>&1
140140 local exit_code_no_ignore=$?
141141 cd " $BASE_DIR "
142142
143143 if [ $exit_code_no_ignore -ne 0 ]; then
144- print_message " $RED " " ✗ Installation without --ignore-files failed with exit code $exit_code_no_ignore "
144+ print_message " $RED " " ✗ Installation with --ignore-files=no failed with exit code $exit_code_no_ignore "
145145 return 1
146146 fi
147147
148148 # Validate ignore files were NOT installed
149149 if [ -f " $test_dir_no_ignore /.cursorignore" ]; then
150- print_message " $RED " " ✗ .cursorignore should not be installed without --ignore-files option"
150+ print_message " $RED " " ✗ .cursorignore should not be installed with --ignore-files=no option"
151151 return 1
152152 fi
153153
154154 if [ -f " $test_dir_no_ignore /.cursorindexingignore" ]; then
155- print_message " $RED " " ✗ .cursorindexingignore should not be installed without --ignore-files option"
155+ print_message " $RED " " ✗ .cursorindexingignore should not be installed with --ignore-files=no option"
156156 return 1
157157 fi
158158
159- print_message " $GREEN " " ✓ Ignore files correctly not installed without --ignore-files option"
159+ print_message " $GREEN " " ✓ Ignore files correctly not installed with --ignore-files=no option"
160160
161- # Test 3: Short option -i
162- print_message " $BLUE " " Testing: php install.php --core -i -y (short option )"
163- local test_dir_short =" $TEMP_DIR /test_ignore_files_short "
164- rm -rf " $test_dir_short "
165- mkdir -p " $test_dir_short "
161+ # Test 3: Default behavior (--ignore-files=yes is default)
162+ print_message " $BLUE " " Testing: php install.php --core --yes (default should install ignore files )"
163+ local test_dir_default =" $TEMP_DIR /test_ignore_files_default "
164+ rm -rf " $test_dir_default "
165+ mkdir -p " $test_dir_default "
166166
167- get_fresh_installer " $test_dir_short /install.php"
168- cd " $test_dir_short "
169- php install.php --core -i -y > output.log 2>&1
170- local exit_code_short =$?
167+ get_fresh_installer " $test_dir_default /install.php"
168+ cd " $test_dir_default "
169+ php install.php --core --yes > output.log 2>&1
170+ local exit_code_default =$?
171171 cd " $BASE_DIR "
172172
173- if [ $exit_code_short -ne 0 ]; then
174- print_message " $RED " " ✗ Installation with -i failed with exit code $exit_code_short "
173+ if [ $exit_code_default -ne 0 ]; then
174+ print_message " $RED " " ✗ Installation with default settings failed with exit code $exit_code_default "
175175 return 1
176176 fi
177177
178- # Validate ignore files were installed with short option
179- validation_output_short =$( validate_ignore_files " $test_dir_short " 2>&1 )
180- validation_result_short =$?
178+ # Validate ignore files were installed by default
179+ validation_output_default =$( validate_ignore_files " $test_dir_default " 2>&1 )
180+ validation_result_default =$?
181181
182- if [ $validation_result_short -ne 0 ]; then
183- print_message " $RED " " ✗ Ignore files validation failed for -i option :"
184- print_message " $YELLOW " " $validation_output_short "
182+ if [ $validation_result_default -ne 0 ]; then
183+ print_message " $RED " " ✗ Ignore files should be installed by default :"
184+ print_message " $YELLOW " " $validation_output_default "
185185 return 1
186186 else
187- print_message " $GREEN " " ✓ Ignore files short option (-i) works correctly "
187+ print_message " $GREEN " " ✓ Ignore files correctly installed by default "
188188 fi
189189
190190 print_message " $GREEN " " ✓ Ignore files option tests passed"
0 commit comments