From f524ddcad6fc2d85bbed50c6c49fb96b957434ae Mon Sep 17 00:00:00 2001
From: Johan Holmberg <holmberg556@gmail.com>
Date: Wed, 12 Jul 2017 13:22:49 +0200
Subject: [PATCH] split test_MD_MT_MF

so the MT test can fail by itself
---
 examples/CMDTEST_gcc.rb | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/examples/CMDTEST_gcc.rb b/examples/CMDTEST_gcc.rb
index c2ee299..029725b 100644
--- a/examples/CMDTEST_gcc.rb
+++ b/examples/CMDTEST_gcc.rb
@@ -432,8 +432,7 @@ class CMDTEST_gcc < Cmdtest::Testcase
 
   #----------------------------------------
 
-  def test_MD_MT_MF
-
+  def setup_MD_MF_MT
     Dir.mkdir "obj"
     Dir.mkdir "other_dir"
 
@@ -445,6 +444,10 @@ class CMDTEST_gcc < Cmdtest::Testcase
       '#include "foo.h"',
       'int main() { printf(HELLO); return 0; }',
     ]
+  end
+
+  def test_MD_MF
+    setup_MD_MF_MT
 
     cmd "#{gcc} -c src/foo.c -o obj/bar.o" do
       comment "normal compile"
@@ -461,6 +464,12 @@ class CMDTEST_gcc < Cmdtest::Testcase
       written_files "obj/bar.o", "other_dir/other_name.d"
       file_equal "other_dir/other_name.d", /^obj\/bar.o: /
     end
+  end
+
+  #----------------------------------------
+
+  def test_MT
+    setup_MD_MF_MT
 
     cmd "#{gcc} -MD -MT xxxxxx -MF other_dir/other_name.d -c src/foo.c -o obj/bar.o" do
       comment "using -MD -MF and -MT (name target in dependency file)"