fold: fix a corner case. By Tomas Heinrich (heinrich.tomas AT gmail.com)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-11-04 15:31:19 +01:00
parent 692bcff577
commit ded688c6f6
2 changed files with 21 additions and 8 deletions

14
testsuite/fold.tests Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
# Copyright 2009 by Denys Vlasenko
# Licensed under GPL v2, see file LICENSE for details.
. testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
testing "fold -s" "fold -w 7 -s" \
"123456\n\t\nasdf" \
"" \
"123456\tasdf" \
exit $FAILCOUNT