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: add a few code snippets f...



details:   https://anonhg.NetBSD.org/src/rev/ce2acd038b73
branches:  trunk
changeset: 376407:ce2acd038b73
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jun 16 13:43:30 2023 +0000

description:
tests/indent: add a few code snippets from usr.bin/xlint

diffstat:

 tests/usr.bin/indent/lsym_rparen_or_rbracket.c |  23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r c886fb0d13a8 -r ce2acd038b73 tests/usr.bin/indent/lsym_rparen_or_rbracket.c
--- a/tests/usr.bin/indent/lsym_rparen_or_rbracket.c    Fri Jun 16 12:55:57 2023 +0000
+++ b/tests/usr.bin/indent/lsym_rparen_or_rbracket.c    Fri Jun 16 13:43:30 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_rparen_or_rbracket.c,v 1.5 2023/06/15 09:19:07 rillig Exp $ */
+/* $NetBSD: lsym_rparen_or_rbracket.c,v 1.6 2023/06/16 13:43:30 rillig Exp $ */
 
 /*
  * Tests for the token lsym_rparen_or_lbracket, which represents ')' or ']',
@@ -54,3 +54,24 @@ int a = array[
                ];
 }
 //indent end
+
+
+//indent input
+{
+       dcs_align((u_int)dcs);
+       mpools.pools[i] = (memory_pool){NULL, 0, 0};
+       list_add(l, (const char[3]){'-', (char)c, '\0'});
+}
+//indent end
+
+//indent run -ci4 -di0 -nlp
+{
+// $ FIXME: No space after cast.
+       dcs_align((u_int) dcs);
+// $ FIXME: Don't add newlines.
+       mpools.pools[i] = (memory_pool) {
+               NULL, 0, 0
+       };
+       list_add(l, (const char[3]){'-', (char)c, '\0'});
+}
+//indent end



Home | Main Index | Thread Index | Old Index