aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index edb9afa0ba..f416beb311 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -1121,6 +1121,21 @@ pub fn main(args: [][]u8) i32 => {
return 0;
}
)SOURCE", "OK\n");
+
+ add_simple_case("nested arrays", R"SOURCE(
+import "std.zig";
+
+pub fn main(args: [][]u8) i32 => {
+ const array_of_strings = [][]u8 {"hello", "this", "is", "my", "thing"};
+ var i: @typeof(array_of_strings.len) = 0;
+ while (i < array_of_strings.len) {
+ print_str(array_of_strings[i]);
+ print_str("\n");
+ i += 1;
+ }
+ return 0;
+}
+ )SOURCE", "hello\nthis\nis\nmy\nthing\n");
}