Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/bin/sh Verify that questionable characters don't have ...
details: https://anonhg.NetBSD.org/src/rev/aae57f950a13
branches: trunk
changeset: 345205:aae57f950a13
user: kre <kre%NetBSD.org@localhost>
date: Thu May 12 13:34:23 2016 +0000
description:
Verify that questionable characters don't have bad associates.
ok christos@
diffstat:
tests/bin/sh/t_arith.sh | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 337ff2b85425 -r aae57f950a13 tests/bin/sh/t_arith.sh
--- a/tests/bin/sh/t_arith.sh Thu May 12 13:31:37 2016 +0000
+++ b/tests/bin/sh/t_arith.sh Thu May 12 13:34:23 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_arith.sh,v 1.3 2016/03/31 16:19:52 christos Exp $
+# $NetBSD: t_arith.sh,v 1.4 2016/05/12 13:34:23 kre Exp $
#
# Copyright (c) 2016 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -834,6 +834,13 @@
atf_check -s exit:0 -o inline:'111\n' -e empty ${TEST_SH} -c \
'echo $(( 0x1234 ? 111 : 222 ))'
+
+ atf_check -s exit:0 -o inline:'-1\n' -e empty ${TEST_SH} -c \
+ 'echo $(( 1 < 2 ? -1 : i > 2 ? 1 : 0 ))'
+ atf_check -s exit:0 -o inline:'0\n' -e empty ${TEST_SH} -c \
+ 'echo $(( 1 < 1 ? -1 : i > 1 ? 1 : 0 ))'
+ atf_check -s exit:0 -o inline:'1\n' -e empty ${TEST_SH} -c \
+ 'echo $(( 2 < 1 ? -1 : 2 > 1 ? 1 : 0 ))'
}
atf_test_case operator_precedence
Home |
Main Index |
Thread Index |
Old Index