diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-19 20:29:08 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-21 20:43:41 -0500 |
| commit | 47f06be36943f808aa9798c19172363afe6ae35c (patch) | |
| tree | 79ede48ae2cbbbbe2e2489b2733df4e907bfe968 /lib/std/process.zig | |
| parent | 21f344b3b903b41fd4793faa82a4ac26ad2544aa (diff) | |
| download | zig-47f06be36943f808aa9798c19172363afe6ae35c.tar.gz zig-47f06be36943f808aa9798c19172363afe6ae35c.zip | |
string literals are now null terminated
this also deletes C string literals from the language, and then makes
the std lib changes and compiler changes necessary to get the behavior
tests and std lib tests passing again.
Diffstat (limited to 'lib/std/process.zig')
| -rw-r--r-- | lib/std/process.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/std/process.zig b/lib/std/process.zig index fca10a240d..3f065de8fc 100644 --- a/lib/std/process.zig +++ b/lib/std/process.zig @@ -473,14 +473,14 @@ pub fn argsFree(allocator: *mem.Allocator, args_alloc: []const []u8) void { } test "windows arg parsing" { - testWindowsCmdLine(c"a b\tc d", [_][]const u8{ "a", "b", "c", "d" }); - testWindowsCmdLine(c"\"abc\" d e", [_][]const u8{ "abc", "d", "e" }); - testWindowsCmdLine(c"a\\\\\\b d\"e f\"g h", [_][]const u8{ "a\\\\\\b", "de fg", "h" }); - testWindowsCmdLine(c"a\\\\\\\"b c d", [_][]const u8{ "a\\\"b", "c", "d" }); - testWindowsCmdLine(c"a\\\\\\\\\"b c\" d e", [_][]const u8{ "a\\\\b c", "d", "e" }); - testWindowsCmdLine(c"a b\tc \"d f", [_][]const u8{ "a", "b", "c", "\"d", "f" }); - - testWindowsCmdLine(c"\".\\..\\zig-cache\\build\" \"bin\\zig.exe\" \".\\..\" \".\\..\\zig-cache\" \"--help\"", [_][]const u8{ + testWindowsCmdLine("a b\tc d", [_][]const u8{ "a", "b", "c", "d" }); + testWindowsCmdLine("\"abc\" d e", [_][]const u8{ "abc", "d", "e" }); + testWindowsCmdLine("a\\\\\\b d\"e f\"g h", [_][]const u8{ "a\\\\\\b", "de fg", "h" }); + testWindowsCmdLine("a\\\\\\\"b c d", [_][]const u8{ "a\\\"b", "c", "d" }); + testWindowsCmdLine("a\\\\\\\\\"b c\" d e", [_][]const u8{ "a\\\\b c", "d", "e" }); + testWindowsCmdLine("a b\tc \"d f", [_][]const u8{ "a", "b", "c", "\"d", "f" }); + + testWindowsCmdLine("\".\\..\\zig-cache\\build\" \"bin\\zig.exe\" \".\\..\" \".\\..\\zig-cache\" \"--help\"", [_][]const u8{ ".\\..\\zig-cache\\build", "bin\\zig.exe", ".\\..", |
