tests/indent: add another test case for preprocessing directives
In process_preprocessing, the variable 'quote' is not used, which makes the code suspicious of not handling the combination of string literals and comments properly.
This commit is contained in:
parent
102d371a8a
commit
658877681d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: token-preprocessing.0,v 1.2 2021/03/12 22:53:18 rillig Exp $ */
|
||||
/* $NetBSD: token-preprocessing.0,v 1.3 2021/03/13 13:04:13 rillig Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*-
|
||||
|
@ -26,3 +26,11 @@
|
|||
# else /* inner else comment */
|
||||
# endif /* inner endif comment */
|
||||
#endif /* outer endif comment */
|
||||
|
||||
#define multi_line_definition /* first line
|
||||
* middle
|
||||
* final line
|
||||
*/ actual_value
|
||||
|
||||
#define comment_in_string_literal "/* no comment "
|
||||
int this_is_an_ordinary_line_again;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: token-preprocessing.0.stdout,v 1.2 2021/03/12 22:53:18 rillig Exp $ */
|
||||
/* $NetBSD: token-preprocessing.0.stdout,v 1.3 2021/03/13 13:04:13 rillig Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*-
|
||||
|
@ -27,3 +27,13 @@
|
|||
#else /* inner else comment */
|
||||
#endif /* inner endif comment */
|
||||
#endif /* outer endif comment */
|
||||
|
||||
#define multi_line_definition /* first line
|
||||
* middle
|
||||
* final line
|
||||
*/ actual_value
|
||||
|
||||
#define comment_in_string_literal "/* no comment "
|
||||
int this_is_an_ordinary_line_again;
|
||||
|
||||
/* $ FIXME: The above empty line is wrong. */
|
||||
|
|
Loading…
Reference in New Issue