aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJosh Wolfe <thejoshwolfe@gmail.com>2017-11-13 19:59:32 -0700
committerJosh Wolfe <thejoshwolfe@gmail.com>2017-11-13 19:59:32 -0700
commit57cd074959cd529f0648264e877f9819f0209ddf (patch)
tree558b763809c431b8c41f989bc48a5f7356690d20 /test
parent1f28fcdec5210762e1ebcf5d5d386d1427f82126 (diff)
downloadzig-57cd074959cd529f0648264e877f9819f0209ddf.tar.gz
zig-57cd074959cd529f0648264e877f9819f0209ddf.zip
parsec supports C comma operator
Diffstat (limited to 'test')
-rw-r--r--test/parsec.zig14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/parsec.zig b/test/parsec.zig
index c3f4ab5412..c8e16755df 100644
--- a/test/parsec.zig
+++ b/test/parsec.zig
@@ -606,8 +606,20 @@ pub fn addCases(cases: &tests.ParseCContext) {
\\ return null;
\\}
);
-}
+ cases.addC("comma operator",
+ \\int foo(void) {
+ \\ return 1, 2;
+ \\}
+ ,
+ \\export fn foo() -> c_int {
+ \\ return {
+ \\ _ = 1;
+ \\ 2
+ \\ };
+ \\}
+ );
+}