Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77644 - trunk/tools/build/v2/test
From: steven_at_[hidden]
Date: 2012-03-30 08:52:00


Author: steven_watanabe
Date: 2012-03-30 08:51:59 EDT (Fri, 30 Mar 2012)
New Revision: 77644
URL: http://svn.boost.org/trac/boost/changeset/77644

Log:
Test for EXIT
Added:
   trunk/tools/build/v2/test/builtin_exit.py (contents, props changed)
Text files modified:
   trunk/tools/build/v2/test/test_all.py | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Added: trunk/tools/build/v2/test/builtin_exit.py
==============================================================================
--- (empty file)
+++ trunk/tools/build/v2/test/builtin_exit.py 2012-03-30 08:51:59 EDT (Fri, 30 Mar 2012)
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+
+# Copyright 2012 Steven Watanabe
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# This tests the EXIT rule.
+
+import BoostBuild
+
+def test_exit(name):
+ t = BoostBuild.Tester(pass_toolset=0)
+
+ t.write("file.jam", """
+ %s ;
+ """ % name)
+ t.run_build_system("-ffile.jam", status=1, stdout="\n")
+ t.rm(".")
+
+ t.write("file.jam", """
+ %s : 0 ;
+ """ % name)
+ t.run_build_system("-ffile.jam", stdout="\n")
+ t.rm(".")
+
+ t.write("file.jam", """
+ %s : 1 ;
+ """ % name)
+ t.run_build_system("-ffile.jam", status=1, stdout="\n")
+ t.rm(".")
+
+ t.write("file.jam", """
+ %s : 2 ;
+ """ % name)
+ t.run_build_system("-ffile.jam", status=2, stdout="\n")
+ t.rm(".")
+
+ t.write("file.jam", """
+ %s a message ;
+ """ % name)
+ t.run_build_system("-ffile.jam", status=1, stdout="a message\n")
+ t.rm(".")
+
+ t.write("file.jam", """
+ %s a message : 0 ;
+ """ % name)
+ t.run_build_system("-ffile.jam", stdout="a message\n")
+ t.rm(".")
+
+ t.cleanup()
+
+test_exit("EXIT")
+test_exit("Exit")
+test_exit("exit")

Modified: trunk/tools/build/v2/test/test_all.py
==============================================================================
--- trunk/tools/build/v2/test/test_all.py (original)
+++ trunk/tools/build/v2/test/test_all.py 2012-03-30 08:51:59 EDT (Fri, 30 Mar 2012)
@@ -130,6 +130,7 @@
           "build_dir",
           "build_file",
           "build_no",
+ "builtin_exit",
           "c_file",
           "chain",
           "clean",


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk