File: ignore-tab-expansion

package info (click to toggle)
diffutils 1%3A3.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,980 kB
  • sloc: ansic: 116,841; sh: 12,881; perl: 535; makefile: 233; sed: 16
file content (28 lines) | stat: -rwxr-xr-x 520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# Test ignoring tab expansion.

. "${srcdir=.}/init.sh"; path_prepend_ ../src

fail=0

for p in '\b' '\r' '\t ' '\n'; do
  printf "$p"'\b\tx\n' >a || framework_failure_
  printf "$p"'\b        x\n' >b || framework_failure

  diff -E a b >out || fail=1
  compare /dev/null out || fail=1
done

require_utf8_locale_

tr '_@' ' \t' >a <<\EOF
@字字字xx@x_@字_@xxx_x@@x
EOF
tr '_@' ' \t' >b <<\EOF
_@字字字xx________x_@字_@xxx_x@@x
EOF

diff -E a b >out || fail=1
compare /dev/null out || fail=1

Exit $fail