aboutsummaryrefslogtreecommitdiff
path: root/driver/parser_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'driver/parser_test.go')
-rw-r--r--driver/parser_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/driver/parser_test.go b/driver/parser_test.go
index 8145d7b..5763d63 100644
--- a/driver/parser_test.go
+++ b/driver/parser_test.go
@@ -369,6 +369,32 @@ bar: "bar";
`,
specErr: true,
},
+ // A terminal and a non-terminal (start symbol) are duplicates.
+ {
+ specSrc: `
+a
+ : foo
+ ;
+foo: "foo";
+a: "a";
+`,
+ specErr: true,
+ },
+ // A terminal and a non-terminal (not start symbol) are duplicates.
+ {
+ specSrc: `
+a
+ : foo
+ ;
+b
+ : bar
+ ;
+foo: "foo";
+bar: "bar";
+b: "a";
+`,
+ specErr: true,
+ },
}
for i, tt := range tests {
t.Run(fmt.Sprintf("#%v", i), func(t *testing.T) {