allow trailing slashes to be passed to env.build_dir()
This commit is contained in:
1 parent
a6a79b8ef1
commit
20f3da3b04
2 files changed
+16
-1
No files matched your search
@@ -197,6 +197,19 @@ describe Rscons do
|
||||
expect(File.exists?('build_two/two.o')).to be_truthy
|
||||
end
|
||||
|
||||
it "supports trailing slashes at the end of build_dir sources and destinations" do
|
||||
test_dir("build_dir")
|
||||
Rscons::Environment.new do |env|
|
||||
env.append("CPPPATH" => Dir["src/**/*/"])
|
||||
env.build_dir("src/one/", "build_one/")
|
||||
env.build_dir("src/two", "build_two")
|
||||
env.Program("build_dir", Dir["src/**/*.c"])
|
||||
end
|
||||
expect(`./build_dir`).to eq "Hello from two()\n"
|
||||
expect(File.exists?("build_one/one.o")).to be_truthy
|
||||
expect(File.exists?("build_two/two.o")).to be_truthy
|
||||
end
|
||||
|
||||
it 'uses build directories before build root' do
|
||||
test_dir('build_dir')
|
||||
env = Rscons::Environment.new do |env|
|
||||
|
||||
Reference in new issue
Block a user