Module Name: src
Committed By: rillig
Date: Sun Nov 7 19:25:26 UTC 2021
Modified Files:
src/tests/usr.bin/indent: token_ident.c
Log Message:
tests/indent: test identifiers containing '$'
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/token_ident.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/indent/token_ident.c
diff -u src/tests/usr.bin/indent/token_ident.c:1.1 src/tests/usr.bin/indent/token_ident.c:1.2
--- src/tests/usr.bin/indent/token_ident.c:1.1 Mon Oct 18 18:10:20 2021
+++ src/tests/usr.bin/indent/token_ident.c Sun Nov 7 19:25:26 2021
@@ -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 @@ t(void)
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