expand: fix incorrect expansion exactly on tab boundary; shrink the code

function                                             old     new   delta
expand_main                                          698     676     -22
xputchar                                              53       -     -53
This commit is contained in:
Denis Vlasenko
2008-12-14 15:45:25 +00:00
parent 005ff882ba
commit 3139ea7f15
2 changed files with 41 additions and 34 deletions

15
testsuite/expand.tests Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPL v2, see file LICENSE for details.
. testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
testing "expand" \
"expand" \
" 12345678 12345678\n" \
"" \
"\t12345678\t12345678\n" \
exit $FAILCOUNT