remove "local" bashism from a few scripts
[oweals/busybox.git] / testsuite / makedevs.tests
index f69b4a6b136d1e15700b1b98d1b243c0f1cce215..b51fe079845b159094c58633293662bb2b42770e 100755 (executable)
@@ -1,9 +1,18 @@
 #!/bin/sh
 # Copyright 2008 by Denys Vlasenko
-# Licensed under GPL v2, see file LICENSE for details.
+# Licensed under GPLv2, see file LICENSE in this source tree.
 
 . ./testing.sh
 
+test x"`id -u`" = x"0" || {
+       echo "SKIPPED: makedevs (must be root to test this)"
+       exit 0
+}
+
+unset LANG
+unset LC_COLLATE
+unset LC_ALL
+
 # ls -ln is showing date. Need to remove that, it's variable
 # sed: (1) "maj, min" -> "maj,min" (2) coalesce spaces
 # cut: remove date
@@ -16,7 +25,7 @@ FILTER_LS2="sed -e 's/,  */,/g' -e 's/  */ /g' | cut -d' ' -f 1-4,9-"
 rm -rf makedevs.testdir
 mkdir makedevs.testdir
 
-optional FEATURE_MAKEDEVS_TABLE FEATURE_FIND_NOT FEATURE_FIND_TYPE FEATURE_LS_RECURSIVE FEATURE_LS_SORTFILES
+optional FEATURE_MAKEDEVS_TABLE FEATURE_FIND_NOT FEATURE_FIND_TYPE FEATURE_LS_RECURSIVE FEATURE_LS_SORTFILES FEATURE_LS_TIMESTAMPS
 testing "makedevs -d ../makedevs.device_table.txt ." \
        "(cd makedevs.testdir && makedevs -d ../makedevs.device_table.txt . 2>&1);
        find makedevs.testdir ! -type d | sort | xargs ls -lnR | $FILTER_LS" \