test(processor): single-line block + inline/block flag cases

This commit is contained in:
2026-07-02 09:20:06 -05:00
parent d3ab6a41be
commit 42c46aa2d5
9 changed files with 12 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
int a = 1; /* one */ int b = 2; /* two */ int c = 3;
+1
View File
@@ -0,0 +1 @@
int a = 1; int b = 2; int c = 3;
+1
View File
@@ -0,0 +1 @@
var x = 5; /* c */ var y = 10;
+1
View File
@@ -0,0 +1 @@
var x = 5; var y = 10;
+1
View File
@@ -0,0 +1 @@
code(); /* block */ // line
+1
View File
@@ -0,0 +1 @@
code(); // line
+1
View File
@@ -0,0 +1 @@
code(); /* block */ // line
+1
View File
@@ -0,0 +1 @@
code(); /* block */
+4
View File
@@ -97,6 +97,10 @@ func TestWholeFile(t *testing.T) {
{name: "intentional blank lines preserved", file: "py_blanks.py"},
{name: "escaped quote then line comment", file: "js_escaped.js"},
{name: "lua marker in string vs real comment", file: "lua_string.lua"},
{name: "single-line block comment removed", file: "js_block.js"},
{name: "multiple single-line blocks on one line", file: "c_multiblock.c"},
{name: "--inline removes only line comments", file: "js_inline_flag.js", cli: types.CLI{Inline: true}},
{name: "--block removes only block comments", file: "js_block_flag.js", cli: types.CLI{Block: true}},
}
for _, tc := range cases {