Module Name: src Committed By: rillig Date: Fri Sep 24 06:30:02 UTC 2021
Modified Files: src/tests/usr.bin/indent: comment-line-end.0 comment-line-end.0.stdout t_indent.sh Log Message: tests/indent: demonstrate token repetition after line-end comment To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/comment-line-end.0 \ src/tests/usr.bin/indent/comment-line-end.0.stdout cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/t_indent.sh 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/comment-line-end.0 diff -u src/tests/usr.bin/indent/comment-line-end.0:1.5 src/tests/usr.bin/indent/comment-line-end.0:1.6 --- src/tests/usr.bin/indent/comment-line-end.0:1.5 Fri Mar 12 18:28:07 2021 +++ src/tests/usr.bin/indent/comment-line-end.0 Fri Sep 24 06:30:02 2021 @@ -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 @@ main(void) { } +/* 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 Index: src/tests/usr.bin/indent/comment-line-end.0.stdout diff -u src/tests/usr.bin/indent/comment-line-end.0.stdout:1.5 src/tests/usr.bin/indent/comment-line-end.0.stdout:1.6 --- src/tests/usr.bin/indent/comment-line-end.0.stdout:1.5 Fri Mar 12 18:28:07 2021 +++ src/tests/usr.bin/indent/comment-line-end.0.stdout Fri Sep 24 06:30:02 2021 @@ -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 @@ main(void) { } +/* 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. */ Index: src/tests/usr.bin/indent/t_indent.sh diff -u src/tests/usr.bin/indent/t_indent.sh:1.4 src/tests/usr.bin/indent/t_indent.sh:1.5 --- src/tests/usr.bin/indent/t_indent.sh:1.4 Mon Mar 8 22:13:05 2021 +++ src/tests/usr.bin/indent/t_indent.sh Fri Sep 24 06:30:02 2021 @@ -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 @@ check() # 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