test short echo mode
This commit is contained in:
parent
5d8e3fe1fd
commit
37d324173a
@ -33,6 +33,17 @@ describe Rscons do
|
||||
end
|
||||
end
|
||||
|
||||
it 'supports short echo mode' do
|
||||
$stdout.should_receive(:puts).once.with('CC simple.o')
|
||||
$stdout.should_receive(:puts).once.with('LD simple')
|
||||
setup_testdir(['simple.c']) do
|
||||
env = Rscons::Environment.new(echo: :short)
|
||||
env.Program('simple', 'simple.c')
|
||||
File.exist?('simple.o').should be_true
|
||||
`./simple`.should =~ /This is a simple C program/
|
||||
end
|
||||
end
|
||||
|
||||
it 'does not rebuild the program if no sources changed' do
|
||||
$stdout.should_receive(:puts).once.with('gcc -c -o simple.o simple.c')
|
||||
$stdout.should_receive(:puts).once.with('gcc -o simple simple.o')
|
||||
|
Loading…
x
Reference in New Issue
Block a user