aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-04-16 13:36:27 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-05-01 17:02:34 +0200
commit2b2944497885313e7b296458092c20f80e2aed2c (patch)
treecedf46fec6439f3709d327cf3539a1ec31b35a2a /validation
parent551b85c8a241bd45b267db152eca4cb01eddce39 (diff)
downloadsparse-dev-2b2944497885313e7b296458092c20f80e2aed2c.tar.gz
do not to ignore old preprocessor testcases
validation/{phase2/backslash,phase3/comments} are two ancient testcases that predate ./test-suite and they are ignored by the testsuite because they do not have a '.c' extension. Change this by: - renaming them with a '.c' extension - moving them to validation/preprocessor/ - adding the testsuite tags & results to them - remove comments about their previous status Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/preprocessor/phase2-backslash.c (renamed from validation/phase2/backslash)29
-rw-r--r--validation/preprocessor/phase3-comments.c (renamed from validation/phase3/comments)12
2 files changed, 27 insertions, 14 deletions
diff --git a/validation/phase2/backslash b/validation/preprocessor/phase2-backslash.c
index 29c85b4d..21d94d7d 100644
--- a/validation/phase2/backslash
+++ b/validation/preprocessor/phase2-backslash.c
@@ -17,11 +17,26 @@
* the rest of tokenizer.
*/
+/*
+ * check-name: phase2-backslash
+ * check-command: sparse -E $file
+ *
+ * check-output-start
+
+"\a"
+1
+D
+'\a'
+ * check-output-end
+ *
+ * check-error-start
+preprocessor/phase2-backslash.c:68:0: warning: backslash-newline at end of file
+ * check-error-end
+ */
+
#define A(x) #x
#define B(x) A(x)
/* This should result in "\a" */
-/* XXX: currently sparse produces "a" */
-/* Partially fixed: now it gives "\\a", which is a separate problem */
B(\a)
#define C\
@@ -32,31 +47,21 @@ C
#define D\
1
/* And this should give D, since '\n' is removed and we get no whitespace */
-/* XXX: currently sparse produces 1 */
-/* Fixed */
D
#define E '\\
a'
/* This should give '\a' - with no warnings issued */
-/* XXX: currently sparse complains a lot and ends up producing a */
-/* Fixed */
E
/* This should give nothing */
-/* XXX: currently sparse produces more junk */
-/* Fixed */
// junk \
more junk
/* This should also give nothing */
-/* XXX: currently sparse produces / * comment * / */
-/* Fixed */
/\
* comment *\
/
/* And this should complain since final newline should not be eaten by '\\' */
-/* XXX: currently sparse does not notice */
-/* Fixed */
\
diff --git a/validation/phase3/comments b/validation/preprocessor/phase3-comments.c
index 8f51a307..7106b480 100644
--- a/validation/phase3/comments
+++ b/validation/preprocessor/phase3-comments.c
@@ -3,7 +3,15 @@
*/
/* This should give nothing */
-/* XXX: currently sparse produces Y */
-/* Fixed */
#define X /*
*/ Y
+
+/*
+ * check-name: phase3-comments
+ * check-command: sparse -E $file
+ *
+ * check-output-start
+
+
+ * check-output-end
+ */