Test that custom clean task action blocks are execution
This commit is contained in:
parent
ecd91e1171
commit
b068fe7574
7
build_tests/simple/clean.rb
Normal file
7
build_tests/simple/clean.rb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
env do |env|
|
||||||
|
env.Program('simple.exe', Dir['*.c'])
|
||||||
|
end
|
||||||
|
|
||||||
|
clean do
|
||||||
|
puts "custom clean action"
|
||||||
|
end
|
@ -372,6 +372,17 @@ EOF
|
|||||||
expect(File.exists?('simple.c')).to be_truthy
|
expect(File.exists?('simple.c')).to be_truthy
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "executes custom clean action blocks" do
|
||||||
|
test_dir("simple")
|
||||||
|
result = run_rscons(args: %w[-f clean.rb])
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(File.exists?("build/e.1/simple.c.o")).to be_truthy
|
||||||
|
result = run_rscons(args: %w[-f clean.rb clean])
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(result.stdout).to match %r{custom clean action}
|
||||||
|
expect(File.exists?("build/e.1/simple.c.o")).to be_falsey
|
||||||
|
end
|
||||||
|
|
||||||
it "does not process environments" do
|
it "does not process environments" do
|
||||||
test_dir("simple")
|
test_dir("simple")
|
||||||
result = run_rscons(args: %w[clean])
|
result = run_rscons(args: %w[clean])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user