Commit e6a4e87f69
Changed files (10)
lib/std/compress/rfc1951.txt → lib/std/compress/testdata/rfc1951.txt
File renamed without changes
lib/std/compress/rfc1951.txt.fixed.z.9 → lib/std/compress/testdata/rfc1951.txt.fixed.z.9
File renamed without changes
lib/std/compress/rfc1951.txt.z.0 → lib/std/compress/testdata/rfc1951.txt.z.0
File renamed without changes
lib/std/compress/rfc1951.txt.z.9 → lib/std/compress/testdata/rfc1951.txt.z.9
File renamed without changes
lib/std/compress/rfc1952.txt → lib/std/compress/testdata/rfc1952.txt
File renamed without changes
lib/std/compress/rfc1952.txt.gz → lib/std/compress/testdata/rfc1952.txt.gz
File renamed without changes
lib/std/compress/gzip.zig
@@ -172,8 +172,8 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void {
// SHA256=164ef0897b4cbec63abf1b57f069f3599bd0fb7c72c2a4dee21bd7e03ec9af67
test "compressed data" {
try testReader(
- @embedFile("rfc1952.txt.gz"),
- @embedFile("rfc1952.txt"),
+ @embedFile("testdata/rfc1952.txt.gz"),
+ @embedFile("testdata/rfc1952.txt"),
);
}
lib/std/compress/zlib.zig
@@ -107,21 +107,21 @@ fn testReader(data: []const u8, expected: []const u8) !void {
// https://tools.ietf.org/rfc/rfc1951.txt length=36944 bytes
// SHA256=5ebf4b5b7fe1c3a0c0ab9aa3ac8c0f3853a7dc484905e76e03b0b0f301350009
test "compressed data" {
- const rfc1951_txt = @embedFile("rfc1951.txt");
+ const rfc1951_txt = @embedFile("testdata/rfc1951.txt");
// Compressed with compression level = 0
try testReader(
- @embedFile("rfc1951.txt.z.0"),
+ @embedFile("testdata/rfc1951.txt.z.0"),
rfc1951_txt,
);
// Compressed with compression level = 9
try testReader(
- @embedFile("rfc1951.txt.z.9"),
+ @embedFile("testdata/rfc1951.txt.z.9"),
rfc1951_txt,
);
// Compressed with compression level = 9 and fixed Huffman codes
try testReader(
- @embedFile("rfc1951.txt.fixed.z.9"),
+ @embedFile("testdata/rfc1951.txt.fixed.z.9"),
rfc1951_txt,
);
}
.gitattributes
@@ -1,9 +1,9 @@
*.zig text eol=lf
*.txt text eol=lf
langref.html.in text eol=lf
-deps/SoftFloat-3e/*.txt text eol=crlf
+lib/std/compress/testdata/** binary
+lib/std/compress/deflate/testdata/** binary
-deps/** linguist-vendored
lib/include/** linguist-vendored
lib/libc/** linguist-vendored
lib/libcxx/** linguist-vendored
build.zig
@@ -106,7 +106,7 @@ pub fn build(b: *Builder) !void {
.install_dir = .lib,
.install_subdir = "zig",
.exclude_extensions = &[_][]const u8{
- // exclude files from lib/std/compress/
+ // exclude files from lib/std/compress/testdata
".gz",
".z.0",
".z.9",