From 82cdca77f18a8f29491885e8bd20c4debfcbdfe2 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 14 Jul 2013 23:17:02 -0400 Subject: [PATCH] test not rebuilding for only a timestamp change --- spec/build_tests_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index b965b69..c96bcfc 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -89,4 +89,19 @@ describe Rscons do lines = build_testdir lines.should == [] end + + it "does not rebuild a C module when only the file's timestampe has changed" do + lines = test_dir('header') + `./header`.should == "The value is 2\n" + lines.should == [ + 'CC header.o', + 'LD header', + ] + header_c = File.read('header.c') + File.open('header.c', 'w') do |fh| + fh.write(header_c) + end + lines = build_testdir + lines.should == [] + end end