opnsense-src/usr.bin/indent/tests/comments.0
Piotr Pawel Stefaniak 61fd3be0b0 indent(1): add regression test cases
These examples show expected behavior of indent(1). They are meant to be used
together with a regression test mechanism, either Kyua, a Makefile or perhaps
something else. The mechanism should in essence do this:
  indent -P${test}.pro < ${test}.0 > ${test}.0.run
and compare ${test}.0.stdout to ${test}.0.run. If the files differ or the exit
status isn't 0, the test failed.

* ${test}.pro is an indent(1) profile: a list of options passed through a file.
  The program doesn't complain if the file doesn't exist.
* ${test}.0 is a C source file which acts as input for indent(1). It doesn't
  have to have any particular formatting, since it's the output that matters.
* ${test}.0.stdout contains expected output. It doesn't have to be formatted in
  Kernel Normal Form as the point of the tests is to check for regressions in
  the program and not to check that it always produces KNF.

Reviewed by:	ngie
Approved by:	pfg (mentor)
Differential Revision:	https://reviews.freebsd.org/D9007
2017-02-10 09:31:39 +00:00

25 lines
625 B
Text

/* $FreeBSD$ */
/* See r303597, r303598, r309219, and r309343 */
void t(void) {
/*
* Old indent wrapped the URL near where this sentence ends.
*
* https://www.freebsd.org/cgi/man.cgi?query=indent&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html
*/
/*
* Old indent did not wrap to column 78
*
* aaaaaa bbbbbb cccccc dddddd eeeeee ffffff ggggg hhhhh iiiii jjjj kk
*/
/*
* Old indent unnecessarily removed the star comment continuation on the next line.
*
* *test*
*/
/* r309219 Go through linked list, freeing from the malloced (t[-1]) address. */
/* r309343 */
}