aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-03-19 23:09:24 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-03-19 23:09:24 -0700
commit86a3448b554e2c9963eed87a43b2db2a8156f842 (patch)
tree70662053a5a39e03e477ad85003626979c68139d /testcases
parentb627e525556c4452cb05ce8744e3f21f2bda2eb2 (diff)
downloadcppawk-86a3448b554e2c9963eed87a43b2db2a8156f842.tar.gz
cppawk-86a3448b554e2c9963eed87a43b2db2a8156f842.tar.bz2
cppawk-86a3448b554e2c9963eed87a43b2db2a8156f842.zip
Handle situations when cpp breaks a line into pieces.
There are situations in which GNU cpp breaks a single line of input into multiple lines. These are indicated by linemarkers that repeat the current line number, for instance: # 3 "file" this # 3 "file" is # 3 "file" all line three line four line five We now remove these repeat linemarkers and collapse the indicated lines back into one line, also eliminating the leading whitespace that tries to preserve the column.
Diffstat (limited to 'testcases')
-rw-r--r--testcases9
1 files changed, 9 insertions, 0 deletions
diff --git a/testcases b/testcases
index 091f19d..8b7dc81 100644
--- a/testcases
+++ b/testcases
@@ -161,3 +161,12 @@ abc'def
BEGIN { print __cppawk_ver >= 20220318 }'
:
1
+--
+30:
+./cppawk '
+#include <limits.h>
+BEGIN {
+ print INT_MIN, INT_MIN, INT_MIN
+}'
+:
+-2147483648 -2147483648 -2147483648