Skip to content

Commit

Permalink
Match Nix loader errors in compiler spec (#12852)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcardiff authored Dec 20, 2022
1 parent b7aa8aa commit 181ec63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/compiler/loader/unix_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ describe Crystal::Loader do
end

it "parses file paths" do
expect_raises(Crystal::Loader::LoadError, /#{Dir.current}\/foobar\.o.+(No such file or directory|image not found)|Cannot open "#{Dir.current}\/foobar\.o"/) do
expect_raises(Crystal::Loader::LoadError, /#{Dir.current}\/foobar\.o.+(No such file or directory|image not found|no such file)|Cannot open "#{Dir.current}\/foobar\.o"/) do
Crystal::Loader.parse(["foobar.o"], search_paths: [] of String)
end
expect_raises(Crystal::Loader::LoadError, /(#{Dir.current}\/foo\/bar\.o).+(No such file or directory|image not found)|Cannot open "#{Dir.current}\/foo\/bar\.o"/) do
expect_raises(Crystal::Loader::LoadError, /(#{Dir.current}\/foo\/bar\.o).+(No such file or directory|image not found|no such file)|Cannot open "#{Dir.current}\/foo\/bar\.o"/) do
Crystal::Loader.parse(["-l", "foo/bar.o"], search_paths: [] of String)
end
end
Expand Down

0 comments on commit 181ec63

Please sign in to comment.