add build test for D
This commit is contained in:
parent
cc2c2733fc
commit
30564af558
6
build_tests/d/main.d
Normal file
6
build_tests/d/main.d
Normal file
@ -0,0 +1,6 @@
|
||||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
writeln("Hello from D!");
|
||||
}
|
@ -304,4 +304,18 @@ EOF
|
||||
'gcc -o tweaker build_one/one.o build_two/two.o',
|
||||
]
|
||||
end
|
||||
|
||||
unless ENV["omit_gdc_tests"]
|
||||
it "supports building D sources" do
|
||||
test_dir("d")
|
||||
Rscons::Environment.new do |env|
|
||||
env.Program("hello-d", Dir["*.d"])
|
||||
end
|
||||
lines.should == [
|
||||
"gdc -c -o main.o main.d",
|
||||
"gdc -o hello-d main.o",
|
||||
]
|
||||
`./hello-d`.rstrip.should == "Hello from D!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user