From 2f3cd66a2bb72e4675732e2eda863273f2309809 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Sat, 23 Feb 2013 09:19:18 +0100 Subject: [PATCH] Support relative includes in tests Since we inline the test file, rather than include it, relative includes from this inlined code would not work. --- bin/gen_test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/gen_test b/bin/gen_test index eb59a4a9..ad182785 100755 --- a/bin/gen_test +++ b/bin/gen_test @@ -13,7 +13,7 @@ ARGV.each do |file| p.each_line do |line| if line =~ /^\s*#(include|import)\b/ includes << "#line #{lineno} \"#{p.realpath}\"\n" - includes << line + includes << line.sub(/"(.*?)"/) { '"' + File.expand_path($1, p.parent) + '"' } else body << "#line #{lineno} \"#{p.realpath}\"\n" body << line