@@ -19,12 +19,12 @@ echo "== On first run, directories should get created"
1919$RMW_TEST_CMD_STRING
2020
2121# Make some temporary files using a fake-year
22- mkdir ${RMW_FAKE_HOME} /tmp-files
23- cd ${RMW_FAKE_HOME} /tmp-files
22+ mkdir " ${RMW_FAKE_HOME} " /tmp-files
23+ cd " ${RMW_FAKE_HOME} " /tmp-files
2424
2525
2626create_temp_files () {
27- cd ${RMW_FAKE_HOME} /tmp-files
27+ cd " ${RMW_FAKE_HOME} " /tmp-files
2828
2929 echo " \n\n == creating temporary files to be rmw'ed"
3030
@@ -41,17 +41,17 @@ create_temp_files() {
4141echo
4242echo
4343echo " Creating some files for testing..."
44- cd ${RMW_FAKE_HOME}
44+ cd " ${RMW_FAKE_HOME} "
4545create_some_files
4646
4747echo
4848echo
4949echo " == rmw --empty command should completely purge the waste folders,"
5050echo " == no matter when they were deleted"
5151
52- $RMW_TEST_CMD_STRING --verbose ${RMW_FAKE_HOME} /somefiles/*
52+ $RMW_TEST_CMD_STRING --verbose " ${RMW_FAKE_HOME} " /somefiles/*
5353
54- echo $SEPARATOR
54+ echo " $SEPARATOR "
5555echo ' == purging disabled should output a message that purging is disabled'
5656output=` $RMW_PURGE_DISABLED_CMD --empty -f`
5757expected=` echo " purging is disabled ('expire_age' is set to '0')" | cut -b1-20`
@@ -73,99 +73,99 @@ echo "n" | $RMW_TEST_CMD_STRING --purge --empty
7373echo " Nqer" | $RMW_TEST_CMD_STRING --purge --empty
7474
7575echo " == (files should still be present)"
76- test -e $PRIMARY_WASTE_DIR /files/read_only_file
77- test -e $PRIMARY_WASTE_DIR /files/topdir
76+ test -e " $PRIMARY_WASTE_DIR " /files/read_only_file
77+ test -e " $PRIMARY_WASTE_DIR " /files/topdir
7878
79- echo $SEPARATOR
79+ echo " $SEPARATOR "
8080echo " == Make sure the correct string (filename) is displayed when using -vvg"
8181output=" $( $RMW_TEST_CMD_STRING -vvg) "
8282echo $output
8383cmp_substr " $output " " 'read_only_file' will be purged in 90$( locale decimal_point) "
8484cmp_substr " $output " " 'topdir' will be purged in 90$( locale decimal_point) "
8585
86- echo $SEPARATOR
86+ echo " $SEPARATOR "
8787echo " == Empty works with force empty (-fe)"
8888echo " y" | $RMW_TEST_CMD_STRING -v --empty -ff
89- test ! -e $PRIMARY_WASTE_DIR /files/read_only_file
90- test ! -e $PRIMARY_WASTE_DIR /files/topdir
91- test ! -e $PRIMARY_WASTE_DIR /info/read_only_file.trashinfo
92- test ! -e $PRIMARY_WASTE_DIR /info/topdir.trashinfo
89+ test ! -e " $PRIMARY_WASTE_DIR " /files/read_only_file
90+ test ! -e " $PRIMARY_WASTE_DIR " /files/topdir
91+ test ! -e " $PRIMARY_WASTE_DIR " /info/read_only_file.trashinfo
92+ test ! -e " $PRIMARY_WASTE_DIR " /info/topdir.trashinfo
9393
9494echo " == Should work with 'Y' or 'y'"
9595create_temp_files
96- $RMW_TEST_CMD_STRING --verbose ${RMW_FAKE_HOME} /tmp-files/* && echo " y" | $RMW_TEST_CMD_STRING --empty
96+ $RMW_TEST_CMD_STRING --verbose " ${RMW_FAKE_HOME} " /tmp-files/* && echo " y" | $RMW_TEST_CMD_STRING --empty
9797
9898create_temp_files
99- $RMW_TEST_CMD_STRING --verbose ${RMW_FAKE_HOME} /tmp-files/*
100- test -e $PRIMARY_WASTE_DIR /files/abc
101- test -e $PRIMARY_WASTE_DIR /files/123
102- test -e $PRIMARY_WASTE_DIR /files/xyz
99+ $RMW_TEST_CMD_STRING --verbose " ${RMW_FAKE_HOME} " /tmp-files/*
100+ test -e " $PRIMARY_WASTE_DIR " /files/abc
101+ test -e " $PRIMARY_WASTE_DIR " /files/123
102+ test -e " $PRIMARY_WASTE_DIR " /files/xyz
103103echo " Y" | $RMW_TEST_CMD_STRING --empty
104104
105105echo
106106echo
107107echo " == Test that the files are really gone"
108108
109- test ! -e $PRIMARY_WASTE_DIR /files/abc
110- test ! -e $PRIMARY_WASTE_DIR /info/abc.trashinfo
111- test ! -e $PRIMARY_WASTE_DIR /files/123
112- test ! -e $PRIMARY_WASTE_DIR /info/123.trashinfo
113- test ! -e $PRIMARY_WASTE_DIR /files/xyz
114- test ! -e $PRIMARY_WASTE_DIR /info/xyz.trashinfo
109+ test ! -e " $PRIMARY_WASTE_DIR " /files/abc
110+ test ! -e " $PRIMARY_WASTE_DIR " /info/abc.trashinfo
111+ test ! -e " $PRIMARY_WASTE_DIR " /files/123
112+ test ! -e " $PRIMARY_WASTE_DIR " /info/123.trashinfo
113+ test ! -e " $PRIMARY_WASTE_DIR " /files/xyz
114+ test ! -e " $PRIMARY_WASTE_DIR " /info/xyz.trashinfo
115115
116116create_temp_files
117117
118- cd ${RMW_FAKE_HOME} /..
118+ cd " ${RMW_FAKE_HOME} " /..
119119echo " \n\n == use a built-in environmental variable to write a"
120120echo " == fake year to the .trashinfo files when running rmw"
121121echo " -----------------------------------------------------\n"
122122
123- RMW_FAKE_YEAR=true $RMW_TEST_CMD_STRING --verbose ${RMW_FAKE_HOME} /tmp-files/*
124- cmp_substr " $( cat $PRIMARY_WASTE_DIR /info/abc.trashinfo) " \
123+ RMW_FAKE_YEAR=true $RMW_TEST_CMD_STRING --verbose " ${RMW_FAKE_HOME} " /tmp-files/*
124+ cmp_substr " $( cat " $PRIMARY_WASTE_DIR " /info/abc.trashinfo) " \
125125 " DeletionDate=1999"
126126
127127echo
128128echo
129129echo " == The trashinfo records that these files were rmw'ed in 1999"
130130echo " == So they will be purged now."
131131$RMW_TEST_CMD_STRING --verbose --purge
132- test ! -e $PRIMARY_WASTE_DIR /files/abc
133- test ! -e $PRIMARY_WASTE_DIR /info/abc.trashinfo
134- test ! -e $PRIMARY_WASTE_DIR /files/123
135- test ! -e $PRIMARY_WASTE_DIR /info/123.trashinfo
136- test ! -e $PRIMARY_WASTE_DIR /files/xyz
137- test ! -e $PRIMARY_WASTE_DIR /info/xyz.trashinfo
132+ test ! -e " $PRIMARY_WASTE_DIR " /files/abc
133+ test ! -e " $PRIMARY_WASTE_DIR " /info/abc.trashinfo
134+ test ! -e " $PRIMARY_WASTE_DIR " /files/123
135+ test ! -e " $PRIMARY_WASTE_DIR " /info/123.trashinfo
136+ test ! -e " $PRIMARY_WASTE_DIR " /files/xyz
137+ test ! -e " $PRIMARY_WASTE_DIR " /info/xyz.trashinfo
138138
139139echo
140140echo
141141echo " Creating some files for testing..."
142- cd ${RMW_FAKE_HOME}
142+ cd " ${RMW_FAKE_HOME} "
143143create_some_files
144144
145- echo $SEPARATOR
145+ echo " $SEPARATOR "
146146echo " == rmw should be able to purge directories and subdirectories"
147147echo " == even if some of the dirs are read-only"
148148
149- echo $SEPARATOR
149+ echo " $SEPARATOR "
150150
151- RMW_FAKE_YEAR=True $RMW_TEST_CMD_STRING --verbose ${RMW_FAKE_HOME} /somefiles
151+ RMW_FAKE_YEAR=True $RMW_TEST_CMD_STRING --verbose " ${RMW_FAKE_HOME} " /somefiles
152152
153- echo $SEPARATOR
153+ echo " $SEPARATOR "
154154echo " == 1 f, this should pass"
155155$RMW_TEST_CMD_STRING -f --purge
156156
157157echo
158158echo
159159echo " == Show that the files are really gone"
160160
161- test ! -e $PRIMARY_WASTE_DIR /files/somefiles
162- test ! -e $PRIMARY_WASTE_DIR /info/somefiles.trashinfo
161+ test ! -e " $PRIMARY_WASTE_DIR " /files/somefiles
162+ test ! -e " $PRIMARY_WASTE_DIR " /info/somefiles.trashinfo
163163
164164$RMW_TEST_CMD_STRING -o
165165
166166echo " == Test 'show_purge_stats' == "
167167create_temp_files
168- RMW_FAKE_YEAR=True $RMW_TEST_CMD_STRING ${RMW_FAKE_HOME} /tmp-files/*
168+ RMW_FAKE_YEAR=True $RMW_TEST_CMD_STRING " ${RMW_FAKE_HOME} " /tmp-files/*
169169output=$( $RMW_TEST_CMD_STRING -g)
170170echo $output
171171cmp_substr " $output " " Purging files based"
0 commit comments