Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/sed Add test for PR/49872
details: https://anonhg.NetBSD.org/src/rev/719260b081ab
branches: trunk
changeset: 344574:719260b081ab
user: christos <christos%NetBSD.org@localhost>
date: Tue Apr 05 00:48:53 2016 +0000
description:
Add test for PR/49872
diffstat:
tests/usr.bin/sed/t_sed.sh | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r 027e7aff4ca2 -r 719260b081ab tests/usr.bin/sed/t_sed.sh
--- a/tests/usr.bin/sed/t_sed.sh Tue Apr 05 00:43:48 2016 +0000
+++ b/tests/usr.bin/sed/t_sed.sh Tue Apr 05 00:48:53 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_sed.sh,v 1.5 2013/03/14 06:03:44 jmmv Exp $
+# $NetBSD: t_sed.sh,v 1.6 2016/04/05 00:48:53 christos Exp $
#
# Copyright (c) 2012 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -119,9 +119,24 @@
-x "printf 'A\nB\nA\nC\nD\nC\n' | sed '/A/,/C/d'"
}
+atf_test_case preserve_leading_ws_ia
+preserve_leading_ws_ia_head() {
+ atf_set "descr" "Test that sed(1) preserves leading whitespace " \
+ "in insert and append (PR bin/49872)"
+}
+
+preserve_leading_ws_ia_body() {
+ atf_check -o inline:" 1 2 3\n4 5 6\n 7 8 9\n\n" \
+ -x 'echo | sed -e "/^$/i\\
+ 1 2 3\\
+4 5 6\\
+ 7 8 9"'
+}
+
atf_init_test_cases() {
atf_add_test_case c2048
atf_add_test_case emptybackref
atf_add_test_case longlines
atf_add_test_case rangeselection
+ atf_add_test_case preserve_leading_ws_ia
}
Home |
Main Index |
Thread Index |
Old Index