if !match?({_, :nt}, :os.type()) do
  # currently there is a parsing error in zigler when running on windows
  # that affects this file:

  defmodule ZiglerTest.CornerCases.TransitiveImportTest do
    use ExUnit.Case, async: true
    use Zig, otp_app: :zigler

    ~Z"""
    const single = @import("single.zig");
    const S = single.S;
    const D = single.D;
    const C = single.C;
    pub fn identity_single(value: S) S {
        return value;
    }
    pub fn identity_double(value: D) D {
        return value;
    }
    pub fn identity_circular(value: C) C {
        return value;
    }
    """

    describe "singly transitive" do
      test "types work" do
        assert %{foo: 47} = identity_single(%{foo: 47})
      end

      test "files are labeled as external resources" do
        assert {:external_resource, ["test/corner_cases/single.zig"]} in __MODULE__.__info__(
                 :attributes
               )
      end
    end

    describe "doubly transitive" do
      test "types work" do
        assert %{foo: 47} = identity_double(%{foo: 47})
      end

      test "files are labeled as external resources" do
        assert {:external_resource, ["test/corner_cases/double.zig"]} in __MODULE__.__info__(
                 :attributes
               )
      end
    end

    describe "circularly transitive" do
      test "types work" do
        assert %{foo: 47} = identity_circular(%{foo: 47})
      end
    end
  end
end
