Commit 0aae96b5f0

Andrew Kelley <superjoe30@gmail.com>
2018-01-18 17:41:20
test: fix brace expansion test not checking invalid inputs
1 parent a4e8e55
Changed files (1)
test
standalone
brace_expansion
test/standalone/brace_expansion/main.zig
@@ -135,9 +135,7 @@ fn expandString(input: []const u8, output: &Buffer) -> %void {
     }
 }
 
-const ListOfBuffer0 = ArrayList(Buffer); // TODO this is working around a compiler bug, fix and delete this
-
-fn expandNode(node: &const Node, output: &ListOfBuffer0) -> %void {
+fn expandNode(node: &const Node, output: &ArrayList(Buffer)) -> %void {
     assert(output.len == 0);
     switch (*node) {
         Node.Scalar => |scalar| {
@@ -214,7 +212,7 @@ fn expectError(test_input: []const u8, expected_err: error) {
     var output_buf = Buffer.initSize(global_allocator, 0) catch unreachable;
     defer output_buf.deinit();
 
-    if (expandString("}ABC", &output_buf)) {
+    if (expandString(test_input, &output_buf)) {
         unreachable;
     } else |err| {
         assert(expected_err == err);