mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-26 15:03:22 +00:00
* src/util.c (output_1_line): When expanding tabs, treat backspace before column 1 as no-op, since that’s what most devices do. * tests/expand-tabs: New test. * tests/Makefile.am (TESTS): Add it.
20 lines
304 B
Bash
Executable File
20 lines
304 B
Bash
Executable File
#!/bin/sh
|
|
# Test tab expansion.
|
|
|
|
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|
|
|
fail=0
|
|
|
|
cat >exp <<'EOF' || framework_failure_
|
|
0a1
|
|
> x
|
|
EOF
|
|
|
|
for p in '\b\tx\n' '\b x\n' '\b \tx\n'; do
|
|
printf "$p" | returns_ 1 diff -t /dev/null - >out || fail=1
|
|
done
|
|
|
|
compare exp out || fail=1
|
|
|
|
Exit $fail
|