╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ behavior.zig ─────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
132 if (builtin.zig_backend != .stage2_spirv and !builtin.cpu.arch.isWasm()) { 133 // Due to lack of import/export of global support 134 // (https://github.com/ziglang/zig/issues/4866), these tests correctly 135 // cause linker errors, since a data symbol cannot be exported when 136 // building an executable. 137 _ = @import("behavior/export_self_referential_type_info.zig"); 138 _ = @import("behavior/extern.zig"); 139 _ = @import("behavior/import_c_keywords.zig"); 140 } 141 } 142 143 // This bug only repros in the root file 144 test "dereference @embedFile() of a file full of zero bytes" { 145 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; 146 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; 147 148 const contents = @embedFile("behavior/zero.bin").*; 149 try @import("std").testing.expect(contents.len == 456); 150 for (contents) |byte| try @import("std").testing.expect(byte == 0); 151 } 152