From 49164c7c0b43e8178bb292d005c4666db7d55e13 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 21 Aug 2019 21:35:57 -0500 Subject: Add some 2>/dev/null to tests that produce gratuitous stderr output. --- tests/link.test | 2 +- tests/mktemp.test | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/link.test b/tests/link.test index d91b7946..31de4a5d 100755 --- a/tests/link.test +++ b/tests/link.test @@ -8,7 +8,7 @@ #testing "name" "command" "result" "infile" "stdin" echo "" >foo -testing "fails on non-existent file" "link foo/foo baz || echo GOOD" "GOOD\n" "" "" +testing "fails on non-existent file" "link foo/foo baz 2>/dev/null || echo GOOD" "GOOD\n" "" "" rm -f foo bar echo file1 > file diff --git a/tests/mktemp.test b/tests/mktemp.test index 0c235469..1e0aa9d8 100755 --- a/tests/mktemp.test +++ b/tests/mktemp.test @@ -18,7 +18,7 @@ testing "TEMPLATE" "TMPDIR=/t mktemp -u hello.XXXXXXXX | grep -q '^hello\....... # mktemp with a template that includes a '/' should ignore $TMPDIR testing "/ TEMPLATE" "TMPDIR=/t mktemp -u /x/hello.XXXXXXXX | grep -q '^/x/hello\.........$' && echo yes" "yes\n" "" "" # ...and setting DIR is an error. -testing "/ TEMPLATE -p DIR" "TMPDIR=/t mktemp -p DIR -u /x/hello.XXXXXXXX || echo error" "error\n" "" "" +testing "/ TEMPLATE -p DIR" "TMPDIR=/t mktemp -p DIR -u /x/hello.XXXXXXXX 2>/dev/null || echo error" "error\n" "" "" # mktemp with -t and a template should use $TMPDIR. testing "-t TEMPLATE" "TMPDIR=/t mktemp -u -t hello.XXXXXXXX | grep -q '^/t/hello\.........$' && echo yes" "yes\n" "" "" @@ -39,7 +39,7 @@ testing "-p DIR -t TEMPLATE but no TMPDIR" "TMPDIR= mktemp -u -p DIR -t hello.XX testing "-u" "mktemp -u -p /proc | grep -q '^/proc/tmp\...........$' && echo yes" "yes\n" "" "" # mktemp needs at least XX in the template. -testing "bad template" "mktemp -u helloX || echo error" "error\n" "" "" +testing "bad template" "mktemp -u helloX 2>/dev/null || echo error" "error\n" "" "" # mktemp -q shouldn't print the path. testing "-q" "mktemp -p /proc -q || echo only-failure" "only-failure\n" "" "" -- cgit v1.2.3