testsuite: check CONFIG_DESKTOP before using 'od -t'
[oweals/busybox.git] / testsuite / ash.tests
index ce585beb1446b2b92643bace677b25ced6891174..2a99245a99fedb0849ba70e644c2fdec289d1745 100755 (executable)
@@ -3,12 +3,15 @@
 # These are not ash tests, we use ash as a way to test lineedit!
 #
 # Copyright 2010 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 -f "$bindir/.config" && . "$bindir/.config"
 
+test x"CONFIG_SCRIPT" = x"y" || exit 0
+test x"CONFIG_HEXDUMP" = x"y" || exit 0
+test x"CONFIG_FEATURE_DEVPTS" = x"y" || exit 0
+
 # testing "test name" "options" "expected result" "file input" "stdin"
 
 if test x"$CONFIG_UNICODE_PRESERVE_BROKEN" = x"y"; then
@@ -67,7 +70,7 @@ testing "2 bytes which are not valid unicode chars followed by left arrow key" \
 # not checked by the test), then read and execute the rest: "echo A | ..."
 # The bug was that ash was eating the beginning of "echo A" despite the pause.
 testing "Invalid unicode chars followed by a pause do not eat next chars" \
-       "{ echo -ne 'echo \xff\n'; sleep 1; echo -ne 'echo A | hexdump -C >ash.output; exit; exit; exit; exit\n'; } \
+       "{ $ECHO -ne 'echo \xff\n'; sleep 1; $ECHO -ne 'echo A | hexdump -C >ash.output; exit; exit; exit; exit\n'; } \
          | script -q -c 'ash' /dev/null >/dev/null; cat ash.output" \
        "\
 00000000  41 0a                                             |A.|