Test phony dependencies
This commit is contained in:
parent
1d020d1aef
commit
fc18c9f123
15
build_tests/typical/phonies.rb
Normal file
15
build_tests/typical/phonies.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class Custom < Rscons::Builder
|
||||
def run(options)
|
||||
print_run_message("#{name} #{target}", nil)
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
env do |env|
|
||||
env.add_builder(Custom)
|
||||
env.Custom("t3", :phony1)
|
||||
env.Custom(:phony1, "t2")
|
||||
env.Custom("t2", :phony2)
|
||||
env.Custom(:phony2, "t1")
|
||||
env.Custom("t1", [])
|
||||
end
|
||||
@ -1347,6 +1347,14 @@ EOF
|
||||
%r{Checker simple.exe},
|
||||
])
|
||||
end
|
||||
|
||||
it "supports phony targets as dependencies" do
|
||||
test_dir "typical"
|
||||
result = run_rscons(args: %w[-f phonies.rb])
|
||||
expect(result.stderr).to eq ""
|
||||
expect(result.status).to eq 0
|
||||
expect(result.stdout).to match /t1.*phony2.*t2.*phony1.*t3/m
|
||||
end
|
||||
end
|
||||
|
||||
context "Environment#clear_targets" do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user