diff options
author | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:42:39 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:45:21 +0100 |
commit | 517cf74f6265ec4308b790b637b3f9778cbdc6e0 (patch) | |
tree | be9337069b60ca1bb03565d8575bacfc71181003 /testsuite | |
parent | ae65dc37bcc9b1d9cef0b111131c79dc4ba1bf51 (diff) | |
parent | ac78f2ac96b3efd6551a08e7dc609efa1fb69481 (diff) | |
download | busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.gz busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.bz2 busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/awk.tests | 6 | ||||
-rw-r--r-- | testsuite/expand/expand-works-like-GNU | 20 | ||||
-rw-r--r-- | testsuite/unexpand/unexpand-works-like-GNU | 56 |
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 | ||
350 | optional FEATURE_AWK_GNU_EXTENSIONS | ||
350 | testing "awk handles invalid for loop" \ | 351 | testing "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" "" "" |
353 | SKIP= | ||
352 | 354 | ||
355 | optional FEATURE_AWK_GNU_EXTENSIONS | ||
353 | testing "awk handles colon not preceded by ternary" \ | 356 | testing "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" "" "" |
358 | SKIP= | ||
355 | 359 | ||
360 | optional FEATURE_AWK_GNU_EXTENSIONS | ||
356 | testing "awk errors on missing delete arg" \ | 361 | testing "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" "" "" |
363 | SKIP= | ||
358 | 364 | ||
359 | # testing "description" "command" "result" "infile" "stdin" | 365 | # testing "description" "command" "result" "infile" "stdin" |
360 | testing 'awk negative field access' \ | 366 | testing '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 | |||
3 | rm -f foo bar | ||
4 | $ECHO -e "\ty" | expand -t 3 ../../busybox > foo | ||
5 | $ECHO -e "\ty" | busybox unexpand -t 3 ../../busybox > bar | ||
6 | set +e | ||
7 | test ! -f foo -a -f bar | ||
8 | if [ $? = 0 ] ; then | ||
9 | set -e | ||
10 | diff -q foo bar | ||
11 | fi | ||
12 | rm -f foo bar | ||
13 | $ECHO -e "\ty\tx" | expand -it 3 ../../busybox > foo | ||
14 | $ECHO -e "\ty\tx" | busybox unexpand -it 3 ../../busybox > bar | ||
15 | set +e | ||
16 | test ! -f foo -a -f bar | ||
17 | if [ $? = 0 ] ; then | ||
18 | set -e | ||
19 | diff -q foo bar | ||
20 | fi | ||
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: | ||
3 | unexpand ../../busybox >/dev/null || exit 0 | ||
4 | |||
5 | rm -f foo bar | ||
6 | echo " y" | unexpand ../../busybox > foo | ||
7 | echo " y" | busybox unexpand ../../busybox > bar | ||
8 | set +e | ||
9 | test ! -f foo -a -f bar | ||
10 | if [ $? = 0 ] ; then | ||
11 | set -e | ||
12 | diff -q foo bar | ||
13 | fi | ||
14 | rm -f foo bar | ||
15 | echo " y" | unexpand ../../busybox > foo | ||
16 | echo " y" | busybox unexpand ../../busybox > bar | ||
17 | set +e | ||
18 | test ! -f foo -a -f bar | ||
19 | if [ $? = 0 ] ; then | ||
20 | set -e | ||
21 | diff -q foo bar | ||
22 | fi | ||
23 | echo " y y" | unexpand ../../busybox > foo | ||
24 | echo " y y" | busybox unexpand ../../busybox > bar | ||
25 | set +e | ||
26 | test ! -f foo -a -f bar | ||
27 | if [ $? = 0 ] ; then | ||
28 | set -e | ||
29 | diff -q foo bar | ||
30 | fi | ||
31 | rm -f foo bar | ||
32 | echo " y y" | unexpand ../../busybox > foo | ||
33 | echo " y y" | busybox unexpand ../../busybox > bar | ||
34 | set +e | ||
35 | test ! -f foo -a -f bar | ||
36 | if [ $? = 0 ] ; then | ||
37 | set -e | ||
38 | diff -q foo bar | ||
39 | fi | ||
40 | echo " y y" | unexpand -a ../../busybox > foo | ||
41 | echo " y y" | busybox unexpand -a ../../busybox > bar | ||
42 | set +e | ||
43 | test ! -f foo -a -f bar | ||
44 | if [ $? = 0 ] ; then | ||
45 | set -e | ||
46 | diff -q foo bar | ||
47 | fi | ||
48 | rm -f foo bar | ||
49 | echo " y y" | unexpand -a ../../busybox > foo | ||
50 | echo " y y" | busybox unexpand -a ../../busybox > bar | ||
51 | set +e | ||
52 | test ! -f foo -a -f bar | ||
53 | if [ $? = 0 ] ; then | ||
54 | set -e | ||
55 | diff -q foo bar | ||
56 | fi | ||