convert Library builder specs to integration tests
This commit is contained in:
1 parent
7e707e7e3b
commit
957fd8c86d
3 files changed
+13
-28
No files matched your search
@@ -960,4 +960,13 @@ EOF
|
||||
expect(result.stderr).to match /unknown input file type: "foo.xyz"/
|
||||
end
|
||||
end
|
||||
|
||||
context "Library builder" do
|
||||
it "allows overriding ARCMD construction variable" do
|
||||
test_dir("library")
|
||||
result = run_test(rsconsfile: "override_arcmd.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(lines(result.stdout)).to include "ar rcf lib.a one.o three.o two.o"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,28 +0,0 @@
|
||||
module Rscons
|
||||
module Builders
|
||||
describe Library do
|
||||
let(:env) {Environment.new}
|
||||
subject {Library.new}
|
||||
|
||||
it "supports overriding AR construction variable" do
|
||||
expect(subject).to receive(:standard_build).with("AR prog.a", "prog.a", ["sp-ar", "rcs", "prog.a", "prog.o"], ["prog.o"], env, :cache)
|
||||
subject.run(
|
||||
target: "prog.a",
|
||||
sources: ["prog.o"],
|
||||
cache: :cache,
|
||||
env: env,
|
||||
vars: {"AR" => "sp-ar"})
|
||||
end
|
||||
|
||||
it "supports overriding ARCMD construction variable" do
|
||||
expect(subject).to receive(:standard_build).with("AR prog.a", "prog.a", ["special", "AR!", "prog.o"], ["prog.o"], env, :cache)
|
||||
subject.run(
|
||||
target: "prog.a",
|
||||
sources: ["prog.o"],
|
||||
cache: :cache,
|
||||
env: env,
|
||||
vars: {"ARCMD" => ["special", "AR!", "${_SOURCES}"]})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user