Control: tags 992313 moreinfo

Em ter., 17 de ago. de 2021 às 01:33, Paul Wise <p...@debian.org> escreveu:
>
> 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

Hi Paul,

Thanks for your help. Unfortunately, your script ends with 'pipetty:
can't allocate a pseudo-terminal: No such file or directory'.

If possible, to create an empty file in Bash, use '> file' instead of
'touch file'.

Regards,

Eriberto

Reply via email to