Source: hexedit
Severity: wishlist

Please add this autopkgtest that tests editing both non-empty and empty
files by passing keys via terminal escape sequences and bytes. You will
need to test-depend on colorized-logs for pipetty and ansi2txt. It
should be possible to add more scenarios by typing keys into hexdump
and converting those to the corresponding printf sequences.

   #!/bin/sh
   set -e
   rm -f nonempty empty result
   echo nonempty > nonempty
   touch empty
   echo result > result
   for f in nonempty empty ; do
     echo "Editing $f in hexedit"
     printf "$f"'\n\tresult\x18y' |
     pipetty hexedit 2>&1 |
     ansi2txt |
     tr '\r' '\n'
   done
   head -vn-0 nonempty empty result
   for f in nonempty empty ; do
     cmp "$f" result
   done

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to