Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/unifdef Add a small testcase for PR/47068.
details: https://anonhg.NetBSD.org/src/rev/e2fe1cab4925
branches: trunk
changeset: 782096:e2fe1cab4925
user: njoly <njoly%NetBSD.org@localhost>
date: Mon Oct 15 17:49:58 2012 +0000
description:
Add a small testcase for PR/47068.
diffstat:
tests/usr.bin/unifdef/t_basic.sh | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diffs (33 lines):
diff -r 35cbb6b94476 -r e2fe1cab4925 tests/usr.bin/unifdef/t_basic.sh
--- a/tests/usr.bin/unifdef/t_basic.sh Mon Oct 15 17:08:33 2012 +0000
+++ b/tests/usr.bin/unifdef/t_basic.sh Mon Oct 15 17:49:58 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_basic.sh,v 1.5 2012/03/18 09:46:50 jruoho Exp $
+# $NetBSD: t_basic.sh,v 1.6 2012/10/15 17:49:58 njoly Exp $
#
# Copyright (c) 2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -40,6 +40,23 @@
-x "unifdef -U__FreeBSD__ $(atf_get_srcdir)/d_basic.in"
}
+atf_test_case lastline
+lastline_head() {
+ atf_set "descr" "Checks with directive on last line (PR bin/47068)"
+}
+
+lastline_body() {
+
+ # With newline after cpp directive
+ printf '#ifdef foo\n#endif\n' >input
+ atf_check -o file:input unifdef -Ubar input
+
+ # Without newline after cpp directive
+ printf '#ifdef foo\n#endif' >input
+ atf_check -o file:input unifdef -Ubar input
+}
+
atf_init_test_cases() {
atf_add_test_case basic
+ atf_add_test_case lastline
}
Home |
Main Index |
Thread Index |
Old Index