Skip to content

Commit 1b1299b

Browse files
committed
test/lex: add CRLF folding tests
1 parent a0b5f01 commit 1b1299b

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

test/data/lex/regression.dat

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,52 @@ IDENT:x
6969
CHAR:\\
7070
EOF
7171
#reset
72+
73+
#data:trunc
74+
"\"}\
75+
#expected
76+
INVALID:"}\n
77+
EOF
78+
#reset
79+
80+
#data
81+
"\"}\
82+
x"
83+
#expected
84+
STRING:"}\nx
85+
S
86+
EOF
87+
#reset
88+
89+
#data
90+
"\"}\"
91+
#expected
92+
STRING:"}\n
93+
S
94+
EOF
95+
#reset
96+
97+
#data
98+
"\"}\x"
99+
#expected
100+
STRING:"}\nx
101+
S
102+
EOF
103+
#reset
104+
105+
#data
106+
"\"}\
107+
x"
108+
#expected
109+
STRING:"}\nx
110+
S
111+
EOF
112+
#reset
113+
114+
#data
115+
"\"}\ x"
116+
#expected
117+
STRING:"}\fx
118+
S
119+
EOF
120+
#reset

test/lex-auto.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ void css__parse_expected(line_ctx *ctx, const char *data, size_t len)
179179

180180
if (escape) {
181181
switch (*p) {
182+
case 'f':
183+
c = 0xc;
184+
break;
182185
case 'n':
183186
c = 0xa;
184187
break;

0 commit comments

Comments
 (0)