Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/bin/sh Make the $'...' syntax tests test what is suppo...
details: https://anonhg.NetBSD.org/src/rev/aa0ddf7c10fd
branches: trunk
changeset: 355901:aa0ddf7c10fd
user: kre <kre%NetBSD.org@localhost>
date: Mon Aug 21 00:56:22 2017 +0000
description:
Make the $'...' syntax tests test what is supposed to work, rather than
what I thought was required (just a couple of changes...).
diffstat:
tests/bin/sh/t_syntax.sh | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diffs (40 lines):
diff -r 84e6a524babd -r aa0ddf7c10fd tests/bin/sh/t_syntax.sh
--- a/tests/bin/sh/t_syntax.sh Sun Aug 20 21:00:01 2017 +0000
+++ b/tests/bin/sh/t_syntax.sh Mon Aug 21 00:56:22 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_syntax.sh,v 1.8 2017/08/19 21:18:47 kre Exp $
+# $NetBSD: t_syntax.sh,v 1.9 2017/08/21 00:56:22 kre Exp $
#
# Copyright (c) 2017 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -324,7 +324,8 @@
atf_check -s exit:0 -e empty -o empty ${TEST_SH} -c \
"test \$'\\r-\\n-\\f' = \$'\\cm-\\cj-\\cl'"
atf_check -s exit:0 -e empty -o empty ${TEST_SH} -c \
- "test \$'\\u0123' = \$'\\304\\243'"
+ "unset LC_ALL; export LC_CTYPE=en_AU.UTF-8;
+ test \$'\\u0123' = \$'\\304\\243'"
atf_check -s exit:0 -e empty -o empty ${TEST_SH} -c \
"test \$'\\u0123' = \$'\\xC4\\xA3'"
atf_check -s exit:0 -e empty -o empty ${TEST_SH} -c \
@@ -348,17 +349,13 @@
atf_check -s not-exit:0 -e not-empty -o ignore ${TEST_SH} -c \
": \$'\\uDEFF'"
atf_check -s not-exit:0 -e not-empty -o ignore ${TEST_SH} -c \
- ": \$'\\u00'"
- atf_check -s not-exit:0 -e not-empty -o ignore ${TEST_SH} -c \
- ": \$'\\u8'"
- atf_check -s not-exit:0 -e not-empty -o ignore ${TEST_SH} -c \
": \$'abcd"
atf_check -s not-exit:0 -e not-empty -o ignore ${TEST_SH} -c \
": \$'abcd\\"
- # anything that generates \0 ends the $'...' immediately (\u cannot)
- atf_check -s exit:0 -e empty -o inline:'aAa' ${TEST_SH} -c \
- "printf '%s' \$'a\\0x'\$'A\\x00X'\$'a\\c@x'"
+ # anything that generates \0 ends the $'...' immediately
+ atf_check -s exit:0 -e empty -o inline:'aAaA' ${TEST_SH} -c \
+ "printf '%s' \$'a\\0x'\$'A\\x00X'\$'a\\c@x'\$'A\\u0000X'"
# \newline in a $'...' is dropped (just like in "" strings)
atf_check -s exit:0 -e empty -o inline:'abcdef' ${TEST_SH} -c \
Home |
Main Index |
Thread Index |
Old Index