From 2302db4dc7abcfc7ab112eb7fd1ce23b747ac286 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Sun, 18 Jun 2017 22:25:00 -0700 Subject: [PATCH] add unit test for `echo -h` --- tests/test1.in | 7 +++---- tests/test1.out | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test1.in b/tests/test1.in index 49bb2f953..3620566e9 100644 --- a/tests/test1.in +++ b/tests/test1.in @@ -114,7 +114,8 @@ begin ; echo is_stdout ; end 2>| cat > /dev/null begin ; echo is_stderr 1>&2 ; end 2>| cat > /dev/null # echo tests - +echo +echo '# echo tests' echo 'abc\ndef' echo -e 'abc\ndef' echo -e 'abc\zdef' @@ -125,11 +126,9 @@ echo -e 'abc\1212def' echo -e 'abc\cdef' # won't output a newline! echo '' echo - - +echo -h echo -ne '\376' | display_bytes - echo -e Catch your breath - echo -e 'abc\x21def' echo -e 'abc\x211def' diff --git a/tests/test1.out b/tests/test1.out index c49e5e0a4..9588a84fd 100644 --- a/tests/test1.out +++ b/tests/test1.out @@ -27,6 +27,8 @@ errput output caret_no_redirect 12345^ is_stdout + +# echo tests abc\ndef abc def @@ -37,6 +39,7 @@ abcQdef abcQ2def abc - +-h 0000000 376 0000001 Catch your breath