diff options
author | Rob Landley | 2006-03-16 15:20:45 +0000 |
---|---|---|
committer | Rob Landley | 2006-03-16 15:20:45 +0000 |
commit | 4bb1b04fd1d7d6fe410e1af14816d11da456aac5 (patch) | |
tree | 601a54598057fc267def41fce1acecfb8e5a2845 /testsuite/sort.tests | |
parent | ea9a471acd94f604f360ea16df5896e795361ac7 (diff) | |
download | busybox-4bb1b04fd1d7d6fe410e1af14816d11da456aac5.zip busybox-4bb1b04fd1d7d6fe410e1af14816d11da456aac5.tar.gz |
Redo test suite to be able to test more than one command at a time. Eliminate
$COMMAND environment variable, instead put full command line (including
command to run) in second argument. Modify $PATH to have test versions of
commands at start of path. (Also more infrastructure for testing as root,
work in progress...)
Diffstat (limited to 'testsuite/sort.tests')
-rwxr-xr-x | testsuite/sort.tests | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/testsuite/sort.tests b/testsuite/sort.tests index 2945309..d1b4253 100755 --- a/testsuite/sort.tests +++ b/testsuite/sort.tests @@ -4,16 +4,15 @@ # Copyright 2005 by Rob Landley <rob@landley.net> # Licensed under GPL v2, see file LICENSE for details. -if [ ${#COMMAND} -eq 0 ]; then COMMAND=sort; fi . testing.sh # The basic tests. These should work even with the small busybox. -testing "sort" "input" "a\nb\nc\n" "c\na\nb\n" "" -testing "sort #2" "input" "010\n1\n3\n" "3\n1\n010\n" "" -testing "sort stdin" "" "a\nb\nc\n" "" "b\na\nc\n" -testing "sort numeric" "-n input" "1\n3\n010\n" "3\n1\n010\n" "" -testing "sort reverse" "-r input" "wook\nwalrus\npoint\npabst\naargh\n" \ +testing "sort" "sort input" "a\nb\nc\n" "c\na\nb\n" "" +testing "sort #2" "sort input" "010\n1\n3\n" "3\n1\n010\n" "" +testing "sort stdin" "sort" "a\nb\nc\n" "" "b\na\nc\n" +testing "sort numeric" "sort -n input" "1\n3\n010\n" "3\n1\n010\n" "" +testing "sort reverse" "sort -r input" "wook\nwalrus\npoint\npabst\naargh\n" \ "point\nwook\npabst\naargh\nwalrus\n" "" # These tests require the full option set. @@ -30,7 +29,7 @@ egg 1 2 papyrus # Sorting with keys -testing "sort one key" "-k4,4 input" \ +testing "sort one key" "sort -k4,4 input" \ "999 3 0 algebra egg 1 2 papyrus 7 3 42 soup @@ -38,7 +37,7 @@ egg 1 2 papyrus 42 1 010 zoology " "$data" "" -testing "sort key range with numeric option" "-k2,3n input" \ +testing "sort key range with numeric option" "sort -k2,3n input" \ "42 1 010 zoology 42 1 3 woot egg 1 2 papyrus @@ -49,7 +48,7 @@ egg 1 2 papyrus # Busybox is definitely doing this one wrong just now. FIXME testing "sort key range with numeric option and global reverse" \ -"-k2,3n -r input" \ +"sort -k2,3n -r input" \ "egg 1 2 papyrus 42 1 3 woot 42 1 010 zoology @@ -59,7 +58,7 @@ testing "sort key range with numeric option and global reverse" \ # -testing "sort key range with multiple options" "-k2,3rn input" \ +testing "sort key range with multiple options" "sort -k2,3rn input" \ "7 3 42 soup 999 3 0 algebra 42 1 010 zoology |