diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-10-22 08:06:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-22 08:06:47 -0400 |
| commit | 0c99ba1eab63865592bb084feb271cd4e4b0357e (patch) | |
| tree | 7004c99fc0619ff94317cc176900d1d3a3c88335 /lib/std/crypto/phc_encoding.zig | |
| parent | 5f92b070bf284f1493b1b5d433dd3adde2f46727 (diff) | |
| parent | 920e9668ddb16fbb98cd08b43ed2364062a4b102 (diff) | |
| download | zig-0c99ba1eab63865592bb084feb271cd4e4b0357e.tar.gz zig-0c99ba1eab63865592bb084feb271cd4e4b0357e.zip | |
Merge pull request #17637 from jacobly0/x86_64-test-std
x86_64: start to enable `test-std` and `test-compiler-rt` testing
Diffstat (limited to 'lib/std/crypto/phc_encoding.zig')
| -rw-r--r-- | lib/std/crypto/phc_encoding.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/crypto/phc_encoding.zig b/lib/std/crypto/phc_encoding.zig index fecd7f1239..58757cec28 100644 --- a/lib/std/crypto/phc_encoding.zig +++ b/lib/std/crypto/phc_encoding.zig @@ -1,6 +1,7 @@ // https://github.com/P-H-C/phc-string-format const std = @import("std"); +const builtin = @import("builtin"); const fmt = std.fmt; const io = std.io; const mem = std.mem; @@ -263,6 +264,8 @@ fn kvSplit(str: []const u8) !struct { key: []const u8, value: []const u8 } { } test "phc format - encoding/decoding" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const Input = struct { str: []const u8, HashResult: type, @@ -348,18 +351,24 @@ test "phc format - encoding/decoding" { } test "phc format - empty input string" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const s = ""; const v = deserialize(struct { alg_id: []const u8 }, s); try std.testing.expectError(Error.InvalidEncoding, v); } test "phc format - hash without salt" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const s = "$scrypt"; const v = deserialize(struct { alg_id: []const u8, hash: BinValue(16) }, s); try std.testing.expectError(Error.InvalidEncoding, v); } test "phc format - calcSize" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const s = "$scrypt$v=1$ln=15,r=8,p=1$c2FsdHNhbHQ$dGVzdHBhc3M"; const v = try deserialize(struct { alg_id: []const u8, |
