diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-08 16:01:47 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-08 16:05:49 +0100 |
commit | 485700db8ffc3fe0cba6cd8464eef020da18bc53 (patch) | |
tree | 85edc36abac44f63117be84adc6c6deb431ff8d0 | |
parent | 2de2f47f8f7bebf028aac95250af2e3c4af2ca29 (diff) | |
download | sparse-485700db8ffc3fe0cba6cd8464eef020da18bc53.tar.gz |
add testcase for missing deliminator ' or "
Add a testcase for "Newline in string or character constant" vs.
"missing delimitator" upcoming change.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | validation/preprocessor/missing-delim.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/validation/preprocessor/missing-delim.c b/validation/preprocessor/missing-delim.c new file mode 100644 index 00000000..3763520b --- /dev/null +++ b/validation/preprocessor/missing-delim.c @@ -0,0 +1,18 @@ +static int c = 'a; + +static char s[] = "abc; +static char t[] = "xyz"; + +extern void foo(void); + +/* + * check-name: missing-delim + * check-command: sparse -E $file + * check-output-ignore + * check-known-to-fail + * + * check-error-start +preprocessor/missing-delim.c:2:0: warning: missing delimitator ' +preprocessor/missing-delim.c:4:0: warning: missing delimitator " + * check-error-end + */ |