aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-08-16 09:42:39 +0100
committerRon Yorston <rmy@pobox.com>2019-08-16 09:45:21 +0100
commit517cf74f6265ec4308b790b637b3f9778cbdc6e0 (patch)
treebe9337069b60ca1bb03565d8575bacfc71181003 /testsuite
parentae65dc37bcc9b1d9cef0b111131c79dc4ba1bf51 (diff)
parentac78f2ac96b3efd6551a08e7dc609efa1fb69481 (diff)
downloadbusybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.gz
busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.bz2
busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/awk.tests6
-rw-r--r--testsuite/expand/expand-works-like-GNU20
-rw-r--r--testsuite/unexpand/unexpand-works-like-GNU56
3 files changed, 6 insertions, 76 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 0db6a26e4..a7a533ba0 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -347,14 +347,20 @@ testing "awk continue" \
347 "" \ 347 "" \
348 'BEGIN { if (1) continue; else a = 1 }' 348 'BEGIN { if (1) continue; else a = 1 }'
349 349
350optional FEATURE_AWK_GNU_EXTENSIONS
350testing "awk handles invalid for loop" \ 351testing "awk handles invalid for loop" \
351 "awk -e '{ for() }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" "" 352 "awk -e '{ for() }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
353SKIP=
352 354
355optional FEATURE_AWK_GNU_EXTENSIONS
353testing "awk handles colon not preceded by ternary" \ 356testing "awk handles colon not preceded by ternary" \
354 "awk -e foo:bar: 2>&1" "awk: cmd. line:1: Unexpected token\n" "" "" 357 "awk -e foo:bar: 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
358SKIP=
355 359
360optional FEATURE_AWK_GNU_EXTENSIONS
356testing "awk errors on missing delete arg" \ 361testing "awk errors on missing delete arg" \
357 "awk -e '{delete}' 2>&1" "awk: cmd. line:1: Too few arguments\n" "" "" 362 "awk -e '{delete}' 2>&1" "awk: cmd. line:1: Too few arguments\n" "" ""
363SKIP=
358 364
359# testing "description" "command" "result" "infile" "stdin" 365# testing "description" "command" "result" "infile" "stdin"
360testing 'awk negative field access' \ 366testing 'awk negative field access' \
diff --git a/testsuite/expand/expand-works-like-GNU b/testsuite/expand/expand-works-like-GNU
deleted file mode 100644
index b0278d88d..000000000
--- a/testsuite/expand/expand-works-like-GNU
+++ /dev/null
@@ -1,20 +0,0 @@
1# FEATURE: CONFIG_UNEXPAND
2
3rm -f foo bar
4$ECHO -e "\ty" | expand -t 3 ../../busybox > foo
5$ECHO -e "\ty" | busybox unexpand -t 3 ../../busybox > bar
6set +e
7test ! -f foo -a -f bar
8if [ $? = 0 ] ; then
9 set -e
10 diff -q foo bar
11fi
12rm -f foo bar
13$ECHO -e "\ty\tx" | expand -it 3 ../../busybox > foo
14$ECHO -e "\ty\tx" | busybox unexpand -it 3 ../../busybox > bar
15set +e
16test ! -f foo -a -f bar
17if [ $? = 0 ] ; then
18 set -e
19 diff -q foo bar
20fi
diff --git a/testsuite/unexpand/unexpand-works-like-GNU b/testsuite/unexpand/unexpand-works-like-GNU
deleted file mode 100644
index 111b277b5..000000000
--- a/testsuite/unexpand/unexpand-works-like-GNU
+++ /dev/null
@@ -1,56 +0,0 @@
1# coreutils 8.25 often says "input line is too long"
2# on ELF executables. In this case, do not run the test:
3unexpand ../../busybox >/dev/null || exit 0
4
5rm -f foo bar
6echo " y" | unexpand ../../busybox > foo
7echo " y" | busybox unexpand ../../busybox > bar
8set +e
9test ! -f foo -a -f bar
10if [ $? = 0 ] ; then
11 set -e
12 diff -q foo bar
13fi
14rm -f foo bar
15echo " y" | unexpand ../../busybox > foo
16echo " y" | busybox unexpand ../../busybox > bar
17set +e
18test ! -f foo -a -f bar
19if [ $? = 0 ] ; then
20 set -e
21 diff -q foo bar
22fi
23echo " y y" | unexpand ../../busybox > foo
24echo " y y" | busybox unexpand ../../busybox > bar
25set +e
26test ! -f foo -a -f bar
27if [ $? = 0 ] ; then
28 set -e
29 diff -q foo bar
30fi
31rm -f foo bar
32echo " y y" | unexpand ../../busybox > foo
33echo " y y" | busybox unexpand ../../busybox > bar
34set +e
35test ! -f foo -a -f bar
36if [ $? = 0 ] ; then
37 set -e
38 diff -q foo bar
39fi
40echo " y y" | unexpand -a ../../busybox > foo
41echo " y y" | busybox unexpand -a ../../busybox > bar
42set +e
43test ! -f foo -a -f bar
44if [ $? = 0 ] ; then
45 set -e
46 diff -q foo bar
47fi
48rm -f foo bar
49echo " y y" | unexpand -a ../../busybox > foo
50echo " y y" | busybox unexpand -a ../../busybox > bar
51set +e
52test ! -f foo -a -f bar
53if [ $? = 0 ] ; then
54 set -e
55 diff -q foo bar
56fi