Skip to content

Commit 1458b68

Browse files
authored
fix: allow , in unquoted words (#264)
1 parent 38a1830 commit 1458b68

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

crates/deno_task_shell/src/grammar.pest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ EXIT_STATUS = ${ "$?" }
153153
// Operators
154154
OPERATOR = _{
155155
AND_IF | OR_IF | DSEMI | DLESS | DGREAT | LESSAND | GREATAND | LESSGREAT | DLESSDASH | CLOBBER |
156-
"," |"(" | ")" | "{" | "}" | ";" | "&" | "|" | "<" | ">"
156+
"(" | ")" | "{" | "}" | ";" | "&" | "|" | "<" | ">"
157157
}
158158

159159
// Reserved words

crates/tests/src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,17 @@ async fn test_reserved_substring() {
14791479
.await;
14801480
}
14811481

1482+
#[tokio::test]
1483+
async fn test_comma_unquoted() {
1484+
// Allow `,` in unquoted words
1485+
TestBuilder::new()
1486+
.command("echo a,b,c")
1487+
.assert_exit_code(0)
1488+
.assert_stdout("a,b,c\n")
1489+
.run()
1490+
.await;
1491+
}
1492+
14821493
#[cfg(test)]
14831494
fn no_such_file_error_text() -> &'static str {
14841495
if cfg!(windows) {

0 commit comments

Comments
 (0)