spec/build_tests_spec.rb in rscons-0.0.5 vs spec/build_tests_spec.rb in rscons-0.0.6

- old
+ new

@@ -141,6 +141,29 @@ test_dir('simple_cc') File.exists?('simple.o').should be_true `./simple`.should == "This is a simple C++ program\n" end + it 'allows overriding construction variables for individual builder calls' do + lines = test_dir('two_sources') + lines.should == [ + 'gcc -c -o one.o -MMD -MF one.mf -DONE one.c', + 'gcc -c -o two.o -MMD -MF two.mf two.c', + 'gcc -o two_sources one.o two.o', + ] + File.exists?('two_sources').should be_true + `./two_sources`.should == "This is a C program with two sources.\n" + end + + it 'builds a static library archive' do + lines = test_dir('library') + lines.should == [ + 'gcc -c -o one.o -MMD -MF one.mf -Dmake_lib one.c', + 'gcc -c -o two.o -MMD -MF two.mf -Dmake_lib two.c', + 'ar rcs lib.a one.o two.o', + 'gcc -c -o three.o -MMD -MF three.mf three.c', + 'gcc -o library lib.a three.o', + ] + File.exists?('library').should be_true + `ar t lib.a`.should == "one.o\ntwo.o\n" + end end