╭ changed ╮ │build.zig│ ╰─────────╯ ╭───────────────────────────────────────────────────────────────────────────╮ │74 │ │75 break :blk install_exe; │ │76 }; │ │77 + │ │78 + // test │ │79 + { │ │80 + const unit_tests = b.addTest(.{ │ │81 + .root_module = b.createModule(.{ │ │82 + .root_source_file = b.path("src/test.zig"), │ │83 + .target = target, │ │84 + .optimize = optimize, │ │85 + }), │ │86 + }); │ │87 + unit_tests.root_module.addImport("xit", xit_dep.module("xit"));│ │88 + │ │89 + const run_unit_tests = b.addRunArtifact(unit_tests); │ │90 + run_unit_tests.has_side_effects = true; │ │91 + const test_step = b.step("test", "Run unit tests"); │ │92 + test_step.dependOn(&install_main_exe.step); │ │93 + test_step.dependOn(&run_unit_tests.step); │ │94 + } │ │95 │ │96 // module for using haxy as a library │ │97 // (the commands below consume haxy this way) │ ╰───────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────╮ │121 │ │122 const run_step = b.step("try", "Try the app"); │ │123 run_step.dependOn(&run_cmd.step); │ │106 - } │ │107 - │ │108 - // test │ │109 - { │ │110 - const unit_tests = b.addTest(.{ │ │111 - .root_module = b.createModule(.{ │ │112 - .root_source_file = b.path("src/test.zig"), │ │113 - .target = target, │ │114 - .optimize = optimize, │ │115 - }), │ │116 - }); │ │117 - unit_tests.root_module.addImport("haxy", haxy); │ │118 - │ │119 - const run_unit_tests = b.addRunArtifact(unit_tests);│ │120 - run_unit_tests.has_side_effects = true; │ │121 - const test_step = b.step("test", "Run unit tests"); │ │122 - test_step.dependOn(&install_main_exe.step); │ │123 - test_step.dependOn(&run_unit_tests.step); │ │124 } │ │125 │ │126 // testnet │ ╰─────────────────────────────────────────────────────────────────╯ ╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭───────────────────────────────────────╮ │1 const std = @import("std"); │ │2 -const hx = @import("haxy"); │ │3 -const evt = hx.event; │ │4 -const xit = hx.xit; │ │2 +const evt = @import("../event.zig");│ │3 +const xit = @import("xit"); │ │4 const rp = xit.repo; │ │5 const hash = xit.hash; │ │6 │ ╰───────────────────────────────────────╯ ╭ changed ───────╮ │src/test/ssh.zig│ ╰────────────────╯ ╭──────────────────────────────────────────────────────╮ │1 const std = @import("std"); │ │2 -const hx = @import("haxy"); │ │3 -const ssh = hx.serve_ssh; │ │4 -const proto = hx.serve_ssh_protocol; │ │2 +const proto = @import("../serve_ssh_protocol.zig");│ │3 const Ed25519 = std.crypto.sign.Ed25519; │ │4 const X25519 = std.crypto.dh.X25519; │ │5 const Sha256 = std.crypto.hash.sha2.Sha256; │ ╰──────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────╮ │ 6 + │ │ 7 +comptime { │ │ 8 + std.testing.refAllDecls(@import("../serve_ssh.zig")); │ │ 9 +} │ │10 │ │11 test "fingerprint format matches openssh layout" { │ │12 const seed = [_]u8{0x42} ** Ed25519.KeyPair.seed_length;│ ╰────────────────────────────────────────────────────────────────╯