implement ConfigureOp#check_lib

This commit is contained in:
josh committed 2018-11-14 22:53:00 -05:00
1 parent 88fd4bd405
commit 3b586cb476
7 files changed
+78 -7

No files matched your search

+26
View File
@@ -1699,6 +1699,32 @@ EOF
end
end
context "check_lib" do
it "succeeds when the requested library is found" do
test_dir "configure"
result = run_rscons(rsconsfile: "check_lib_success.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to eq 0
expect(result.stdout).to match /Checking for library 'm'... found/
end
it "fails when the requested library is not found" do
test_dir "configure"
result = run_rscons(rsconsfile: "check_lib_failure.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to_not eq 0
expect(result.stdout).to match /Checking for library 'mfoofoo'... not found/
end
it "succeeds when the requested library is not found but :fail is set to false" do
test_dir "configure"
result = run_rscons(rsconsfile: "check_lib_no_fail.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to eq 0
expect(result.stdout).to match /Checking for library 'mfoofoo'... not found/
end
end
context "check_executable" do
it "succeeds when the requested executable is found" do
test_dir "configure"