Skip to content

Commit b7e3a0b

Browse files
committed
tests adfls: fix tests on Windows and MacOS.
Reordering the command line arguments calling adfls. The tests were passing on Linux, but on Windows and MacOS, the command-line arguments seems to be interpreted as filenames. Apparently, getopt on Windows and on MacOS does not accept options (switches) after the positional arguments (here - after the first argument, the adf file). This modification fixes that issue.
1 parent 7c2c510 commit b7e3a0b

File tree

8 files changed

+10
-6
lines changed

8 files changed

+10
-6
lines changed

tests/examples2/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ add_test( test_adfinfo_links.sh ${BASH_PROGRAM}
2121
add_test( test_adf_floppy.sh ${BASH_PROGRAM}
2222
test_adf_floppy.sh )
2323

24+
add_test( test_adfls.sh ${BASH_PROGRAM}
25+
test_adfls.sh )
26+
2427
add_test( test_adfsalvage.sh ${BASH_PROGRAM}
2528
test_adfsalvage.sh )
2629

tests/examples2/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dist_check_SCRIPTS = \
1111
test_adfinfo.sh \
1212
test_adfinfo_hd.sh \
1313
test_adf_floppy.sh \
14+
test_adfls.sh \
1415
test_adfsalvage.sh \
1516
test_unadf.sh \
1617
test_unadf_hdd.sh \

tests/examples2/cmd/adfls/adfls_dir1_1_long

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmd(){
2-
${adfls} "$dumpFile" -p 0 -l dir1/dir1_1
2+
${adfls} -p 0 -l "$dumpFile" dir1/dir1_1
33
}
44

55
comment(){

tests/examples2/cmd/adfls/adfls_file_long

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmd(){
2-
${adfls} "$dumpFile" -p 0 -l dir1/dir1_1/testfile1.txt
2+
${adfls} -p 0 -l "$dumpFile" dir1/dir1_1/testfile1.txt
33
}
44

55
comment(){

tests/examples2/cmd/adfls/adfls_hardlink_dir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmd(){
2-
${adfls} "$dumpFile" -p 0 -l hardlinks_dir/hl2dir1
2+
${adfls} -p 0 -l "$dumpFile" hardlinks_dir/hl2dir1
33
}
44

55
comment(){

tests/examples2/cmd/adfls/adfls_hardlink_file

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmd(){
2-
${adfls} "$dumpFile" -p 0 -l hardlinks_file/hl2testfile1
2+
${adfls} -p 0 -l "$dumpFile" hardlinks_file/hl2testfile1
33
}
44

55
comment(){

tests/examples2/cmd/adfls/adfls_main_dir_long

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmd(){
2-
${adfls} "$dumpFile" -p 0 -l
2+
${adfls} -p 0 -l "$dumpFile"
33
}
44

55
comment(){

tests/examples2/cmd/adfls/adfls_softlink

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmd(){
2-
${adfls} "$dumpFile" -p 0 -l dir1/dir1_1/sl2testfile1samedir
2+
${adfls} -p 0 -l "$dumpFile" dir1/dir1_1/sl2testfile1samedir
33
}
44

55
comment(){

0 commit comments

Comments
 (0)