test command echoing
This commit is contained in:
1 parent
1eb9008885
commit
03f8f56858
2 files changed
+12
-3
No files matched your search
@@ -13,7 +13,7 @@ describe Rscons do
|
||||
|
||||
def build_testdir
|
||||
if File.exists?("build.rb")
|
||||
system("ruby -I #{@owd}/lib -r rscons build.rb")
|
||||
system("ruby -I #{@owd}/lib -r rscons build.rb > build.out")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -44,6 +44,14 @@ describe Rscons do
|
||||
`./simple`.should == "This is a simple C program\n"
|
||||
end
|
||||
|
||||
it 'prints commands as they are executed' do
|
||||
test_dir('simple')
|
||||
File.read('build.out').should == <<EOF
|
||||
gcc -c -o simple.o -MMD -MF simple.mf simple.c
|
||||
gcc -o simple simple.o
|
||||
EOF
|
||||
end
|
||||
|
||||
it 'builds a C program with one source file and one header file' do
|
||||
test_dir('header')
|
||||
File.exists?('header.o').should be_true
|
||||
|
||||
Reference in new issue
Block a user