File: test.sh

package info (click to toggle)
hexedit 1.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 224 kB
  • sloc: ansic: 1,619; sh: 174; makefile: 36
file content (22 lines) | stat: -rwxr-xr-x 433 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# Test created by Paul Wise (pabs) for hexedit on Debian.

set -e

rm -f nonempty empty result

echo -n nonempty > nonempty
echo -n > empty
echo -n result > result
for f in nonempty empty ; do
  echo "Editing $f in hexedit"
  printf "$f"'\n\tresult\33ty\30y' |
  TERM=xterm pipetty hexedit 2>&1 |
  ansi2txt |
  tr '\r' '\n'
done
head -vn-0 nonempty empty result ; echo
for f in nonempty empty ; do
  cmp "$f" result
done