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: demonstrate token repetit...
details: https://anonhg.NetBSD.org/src/rev/738533ec1d1a
branches: trunk
changeset: 1023712:738533ec1d1a
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Sep 24 06:30:02 2021 +0000
description:
tests/indent: demonstrate token repetition after line-end comment
diffstat:
tests/usr.bin/indent/comment-line-end.0 | 9 ++++++++-
tests/usr.bin/indent/comment-line-end.0.stdout | 11 ++++++++++-
tests/usr.bin/indent/t_indent.sh | 6 +++---
3 files changed, 21 insertions(+), 5 deletions(-)
diffs (66 lines):
diff -r 9b58740605c4 -r 738533ec1d1a tests/usr.bin/indent/comment-line-end.0
--- a/tests/usr.bin/indent/comment-line-end.0 Fri Sep 24 06:23:35 2021 +0000
+++ b/tests/usr.bin/indent/comment-line-end.0 Fri Sep 24 06:30:02 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: comment-line-end.0,v 1.5 2021/03/12 18:28:07 rillig Exp $ */
+/* $NetBSD: comment-line-end.0,v 1.6 2021/09/24 06:30:02 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -27,4 +27,11 @@
{
}
+/* FIXME: in the formatted output, the word 'bar' is repeated. */
+void c99_comment(void)
+{
+foo(); // C++ comment
+bar();
+}
+
// end-of-line comment at the end of the file
diff -r 9b58740605c4 -r 738533ec1d1a tests/usr.bin/indent/comment-line-end.0.stdout
--- a/tests/usr.bin/indent/comment-line-end.0.stdout Fri Sep 24 06:23:35 2021 +0000
+++ b/tests/usr.bin/indent/comment-line-end.0.stdout Fri Sep 24 06:30:02 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: comment-line-end.0.stdout,v 1.5 2021/03/12 18:28:07 rillig Exp $ */
+/* $NetBSD: comment-line-end.0.stdout,v 1.6 2021/09/24 06:30:02 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -30,5 +30,14 @@
{
}
+/* FIXME: in the formatted output, the word 'bar' is repeated. */
+void
+c99_comment(void)
+{
+ foo(); // C++ comment
+bar bar();
+}
+
// end-of-line comment at the end of the file
+/* $ FIXME: the extra empty line above this line is wrong. */
diff -r 9b58740605c4 -r 738533ec1d1a tests/usr.bin/indent/t_indent.sh
--- a/tests/usr.bin/indent/t_indent.sh Fri Sep 24 06:23:35 2021 +0000
+++ b/tests/usr.bin/indent/t_indent.sh Fri Sep 24 06:30:02 2021 +0000
@@ -1,5 +1,5 @@
#! /bin/sh
-# $NetBSD: t_indent.sh,v 1.4 2021/03/08 22:13:05 rillig Exp $
+# $NetBSD: t_indent.sh,v 1.5 2021/09/24 06:30:02 rillig Exp $
#
# Copyright 2016 Dell EMC
# All rights reserved.
@@ -40,8 +40,8 @@
# to pass.
atf_check cp ${SRCDIR}/${tc}* .
- # Remove single-line comments that start with '$'. This removes RCS
- # IDs, preventing them to be broken into several lines. It also
+ # Remove single-line block comments that start with '$'. This removes
+ # RCS IDs, preventing them to be broken into several lines. It also
# allows for remarks that are only needed in either the input or the
# output. These removals affect the line numbers in the diffs.
for fname in "$tc" "$tc.stdout" "$tc.stderr"; do
Home |
Main Index |
Thread Index |
Old Index