Skip to content

Commit

Permalink
fix ffi_spec.cr
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Oct 31, 2024
1 parent 6cef1a3 commit 1f1c88c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/compiler/ffi/ffi_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,17 @@ describe Crystal::FFI::CallInterface do
before_all do
FileUtils.mkdir_p(SPEC_CRYSTAL_LOADER_LIB_PATH)
build_c_dynlib(compiler_datapath("ffi", "sum.c"))

{% if flag?(:win32) && flag?(:gnu) %}
ENV["PATH"] = "#{SPEC_CRYSTAL_LOADER_LIB_PATH}#{Process::PATH_DELIMITER}#{ENV["PATH"]}"
{% end %}
end

after_all do
{% if flag?(:win32) && flag?(:gnu) %}
ENV["PATH"] = ENV["PATH"].delete_at(0, ENV["PATH"].index!(Process::PATH_DELIMITER) + 1)
{% end %}

FileUtils.rm_rf(SPEC_CRYSTAL_LOADER_LIB_PATH)
end

Expand Down

0 comments on commit 1f1c88c

Please sign in to comment.