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 binary operators for...
details: https://anonhg.NetBSD.org/src/rev/4530f9582f6c
branches: trunk
changeset: 990531:4530f9582f6c
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Oct 29 22:37:25 2021 +0000
description:
tests/indent: test binary operators for tokens in column 1
diffstat:
tests/usr.bin/indent/token_binary_op.c | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diffs (40 lines):
diff -r a365720b953a -r 4530f9582f6c tests/usr.bin/indent/token_binary_op.c
--- a/tests/usr.bin/indent/token_binary_op.c Fri Oct 29 21:56:36 2021 +0000
+++ b/tests/usr.bin/indent/token_binary_op.c Fri Oct 29 22:37:25 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token_binary_op.c,v 1.4 2021/10/29 21:56:36 rillig Exp $ */
+/* $NetBSD: token_binary_op.c,v 1.5 2021/10/29 22:37:25 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -239,3 +239,30 @@
/* XXX: The parameter '(int)' is wrongly interpreted as a type cast. */
/* XXX: The parameter '(int, int)' is wrongly interpreted as a type cast. */
#indent run-equals-input -di0
+
+
+/*
+ * Ensure that the result of the indentation does not depend on whether a
+ * token from the input starts in column 1 or 9.
+ *
+ * See process_binary_op, ps.prev_col_1.
+ */
+#indent input
+int col_1 //
+= //
+1;
+
+int col_9 //
+ = //
+ 9;
+#indent end
+
+#indent run
+int col_1 //
+= //
+1;
+
+int col_9 //
+= //
+9;
+#indent end
Home |
Main Index |
Thread Index |
Old Index