implement ConfigureOp#check_c_header

This commit is contained in:
josh committed 2018-11-07 21:39:42 -05:00
1 parent 95d5ada865
commit 6bb0a55a55
6 files changed
+87

No files matched your search

+26
View File
@@ -1620,6 +1620,32 @@ EOF
end
end
end
context "check_c_header" do
it "succeeds when the requested header is found" do
test_dir "configure"
result = run_rscons(rsconsfile: "check_c_header_success.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to eq 0
expect(result.stdout).to match /Checking for C header 'string\.h'... found/
end
it "fails when the requested header is not found" do
test_dir "configure"
result = run_rscons(rsconsfile: "check_c_header_failure.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to_not eq 0
expect(result.stdout).to match /Checking for C header 'not___found\.h'... not found/
end
it "succeeds when the requested header is not found but :fail is set to false" do
test_dir "configure"
result = run_rscons(rsconsfile: "check_c_header_no_fail.rb", op: "configure")
expect(result.stderr).to eq ""
expect(result.status).to eq 0
expect(result.stdout).to match /Checking for C header 'not___found\.h'... not found/
end
end
end
end