From 358aaab90051cb25bce94c02b29511bc31817673 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Fri, 30 Mar 2012 12:51:59 +0000 Subject: [PATCH] Test for EXIT [SVN r77644] --- v2/test/builtin_exit.py | 54 +++++++++++++++++++++++++++++++++++++++++ v2/test/test_all.py | 1 + 2 files changed, 55 insertions(+) create mode 100755 v2/test/builtin_exit.py diff --git a/v2/test/builtin_exit.py b/v2/test/builtin_exit.py new file mode 100755 index 000000000..2e4fd1215 --- /dev/null +++ b/v2/test/builtin_exit.py @@ -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") diff --git a/v2/test/test_all.py b/v2/test/test_all.py index 761c8ad87..9972fa7ab 100644 --- a/v2/test/test_all.py +++ b/v2/test/test_all.py @@ -130,6 +130,7 @@ tests = [ "absolute_sources", "build_dir", "build_file", "build_no", + "builtin_exit", "c_file", "chain", "clean",