aboutsummaryrefslogtreecommitdiff
path: root/test/cli.zig
diff options
context:
space:
mode:
authorJimmi Holst Christensen <jimmiholstchristensen@gmail.com>2018-11-13 05:08:37 -0800
committerGitHub <noreply@github.com>2018-11-13 05:08:37 -0800
commit8139c5a516eaa217ed76acdf09496895451c5c5c (patch)
tree89841cec818c5650471c7f2c11141013f8640bf7 /test/cli.zig
parent67fbb0434f7104801c66e821b5057a8323e377df (diff)
downloadzig-8139c5a516eaa217ed76acdf09496895451c5c5c.tar.gz
zig-8139c5a516eaa217ed76acdf09496895451c5c5c.zip
New Zig formal grammar (#1685)
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
Diffstat (limited to 'test/cli.zig')
-rw-r--r--test/cli.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/cli.zig b/test/cli.zig
index 3486b5a547..a07c447d2d 100644
--- a/test/cli.zig
+++ b/test/cli.zig
@@ -30,8 +30,8 @@ pub fn main() !void {
const zig_exe = try os.path.resolve(a, zig_exe_rel);
const dir_path = try os.path.join(a, cache_root, "clitest");
- const TestFn = fn ([]const u8, []const u8) error!void;
- const test_fns = []TestFn.{
+ const TestFn = fn ([]const u8, []const u8) anyerror!void;
+ const test_fns = []TestFn{
testZigInitLib,
testZigInitExe,
testGodboltApi,
@@ -85,18 +85,18 @@ fn exec(cwd: []const u8, argv: []const []const u8) !os.ChildProcess.ExecResult {
}
fn testZigInitLib(zig_exe: []const u8, dir_path: []const u8) !void {
- _ = try exec(dir_path, [][]const u8.{ zig_exe, "init-lib" });
- const test_result = try exec(dir_path, [][]const u8.{ zig_exe, "build", "test" });
+ _ = try exec(dir_path, [][]const u8{ zig_exe, "init-lib" });
+ const test_result = try exec(dir_path, [][]const u8{ zig_exe, "build", "test" });
assertOrPanic(std.mem.endsWith(u8, test_result.stderr, "All tests passed.\n"));
}
fn testZigInitExe(zig_exe: []const u8, dir_path: []const u8) !void {
- _ = try exec(dir_path, [][]const u8.{ zig_exe, "init-exe" });
- const run_result = try exec(dir_path, [][]const u8.{ zig_exe, "build", "run" });
+ _ = try exec(dir_path, [][]const u8{ zig_exe, "init-exe" });
+ const run_result = try exec(dir_path, [][]const u8{ zig_exe, "build", "run" });
assertOrPanic(std.mem.eql(u8, run_result.stderr, "All your base are belong to us.\n"));
}
-fn testGodboltApi(zig_exe: []const u8, dir_path: []const u8) error!void {
+fn testGodboltApi(zig_exe: []const u8, dir_path: []const u8) anyerror!void {
if (builtin.os != builtin.Os.linux or builtin.arch != builtin.Arch.x86_64) return;
const example_zig_path = try os.path.join(a, dir_path, "example.zig");
@@ -113,7 +113,7 @@ fn testGodboltApi(zig_exe: []const u8, dir_path: []const u8) error!void {
\\}
);
- const args = [][]const u8.{
+ const args = [][]const u8{
zig_exe, "build-obj",
"--cache-dir", dir_path,
"--output", example_s_path,