From 3c476d32acdf309382b2ed7729a2ad23c784b16d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 9 Sep 2004 10:55:59 +0000 Subject: [PATCH] Simplify the test, and avoid conflicts with the 'RC' type defined in 'msvc.jam/rc.jam'. [SVN r24986] --- v2/test/custom_generator.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/v2/test/custom_generator.py b/v2/test/custom_generator.py index d5c633223..d0901ab71 100644 --- a/v2/test/custom_generator.py +++ b/v2/test/custom_generator.py @@ -18,15 +18,17 @@ t = Tester() # The resulting OBJ will be unusable, but it must be created. t.write("project-root.jam", """ -import rc ; +import rcc ; """) -t.write("rc.jam", """ +t.write("rcc.jam", """ import type ; import generators ; import print ; -type.register RC : rc ; +# Use 'RCC' to avoid conflicts with definitions in +# the standard rc.jam and msvc.jam +type.register RCC : rcc ; rule resource-compile ( targets * : sources * : properties * ) { @@ -34,25 +36,18 @@ rule resource-compile ( targets * : sources * : properties * ) print.text "rc-object" ; } -generators.register-standard rc.resource-compile : RC : OBJ ; +generators.register-standard rcc.resource-compile : RCC : OBJ ; """) t.write("Jamfile", """ -exe hello : hello.cpp r.rc ; +obj r : r.rcc ; """) -t.write("hello.cpp", """ -int main() -{ - return 0; -} +t.write("r.rcc", """ """) -t.write("r.rc", """ -""") - -t.run_build_system(status=None, stderr=None) +t.run_build_system() t.expect_content("bin/$toolset/debug/r.obj", "rc-object\n") t.cleanup()