diff options
Diffstat (limited to 'tests/split')
-rwxr-xr-x | tests/split/b-chunk.sh | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/tests/split/b-chunk.sh b/tests/split/b-chunk.sh index 86f95a057..fefa0900d 100755 --- a/tests/split/b-chunk.sh +++ b/tests/split/b-chunk.sh @@ -31,20 +31,29 @@ stat x?? 2>/dev/null && fail=1 printf '1\n2\n3\n4\n5\n' > in || framework_failure_ -split -n 3 in > out || fail=1 -split -n 1/3 in > b1 || fail=1 -split -n 2/3 in > b2 || fail=1 -split -n 3/3 in > b3 || fail=1 -printf '1\n2' > exp-1 -printf '\n3\n' > exp-2 -printf '4\n5\n' > exp-3 - -compare exp-1 xaa || fail=1 -compare exp-2 xab || fail=1 -compare exp-3 xac || fail=1 -compare exp-1 b1 || fail=1 -compare exp-2 b2 || fail=1 -compare exp-3 b3 || fail=1 -test -f xad && fail=1 +for file in in /proc/version /sys/kernel/profiling; do + split -n 3 $file > out || fail=1 + split -n 1/3 $file > b1 || fail=1 + split -n 2/3 $file > b2 || fail=1 + split -n 3/3 $file > b3 || fail=1 + + case $file in + in) + printf '1\n2' > exp-1 + printf '\n3\n' > exp-2 + printf '4\n5\n' > exp-3 + + compare exp-1 xaa || fail=1 + compare exp-2 xab || fail=1 + compare exp-3 xac || fail=1 + ;; + esac + + compare xaa b1 || fail=1 + compare xab b2 || fail=1 + compare xac b3 || fail=1 + cat xaa xab xac | compare - $file || fail=1 + test -f xad && fail=1 +done Exit $fail |