Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/indent tests/indent: test identifiers containi...
details: https://anonhg.NetBSD.org/src/rev/a906a66a8b32
branches: trunk
changeset: 1025159:a906a66a8b32
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 07 19:25:26 2021 +0000
description:
tests/indent: test identifiers containing '$'
diffstat:
tests/usr.bin/indent/token_ident.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r 01111e3384f9 -r a906a66a8b32 tests/usr.bin/indent/token_ident.c
--- a/tests/usr.bin/indent/token_ident.c Sun Nov 07 19:21:32 2021 +0000
+++ b/tests/usr.bin/indent/token_ident.c Sun Nov 07 19:25:26 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token_ident.c,v 1.1 2021/10/18 18:10:20 rillig Exp $ */
+/* $NetBSD: token_ident.c,v 1.2 2021/11/07 19:25:26 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -62,3 +62,18 @@
x._y = 5;
}
#indent end
+
+
+/*
+ * Test identifiers containing '$', which some compilers support as an
+ * extension to the C standard.
+ */
+#indent input
+int $ = jQuery; // just kidding
+const char SYS$LOGIN[]="$HOME";
+#indent end
+
+#indent run
+int $ = jQuery; // just kidding
+const char SYS$LOGIN[] = "$HOME";
+#indent end
Home |
Main Index |
Thread Index |
Old Index