From 353ea4756e321d56b4fa76b2d1ef2ce62c4ec48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 26 Jun 2012 11:03:29 +0000 Subject: [PATCH] Corrected the Boost Build core_nt_cmd_line.py test failure caused by empty actions now getting reported to stdout correctly. Updated the test to make sure all the whitespace action content gets printed out correctly. [SVN r79106] --- test/core_nt_cmd_line.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/test/core_nt_cmd_line.py b/test/core_nt_cmd_line.py index 77b05f180..f558b78a1 100755 --- a/test/core_nt_cmd_line.py +++ b/test/core_nt_cmd_line.py @@ -34,20 +34,25 @@ def string_of_length(n): return " ".join(result) -# Boost Jam currently does not allow preparing actions with completly empty -# content as it always requires at least a single whitespace after the opening -# brace in order to satisfy. +# Boost Jam currently does not allow preparing actions with completely empty +# content and always requires at least a single whitespace after the opening +# brace in order to satisfy its Boost Jam language grammar rules. def test_raw_empty(): + whitespace = " \n\n\r\r\v\v\t\t \t \r\r \n\n" t = BoostBuild.Tester("-d2 -d+4", pass_d0=False, pass_toolset=0, use_test_config=False) t.write("file.jam", """\ -actions do_empty { %s} +actions do_empty {%s} JAMSHELL = %% ; do_empty all ; -""" % (" \n\n\r\r\v\v\t\t \t \r\r \n\n")) +""" % (whitespace)) t.run_build_system("-ffile.jam") - t.expect_output_line("do_empty*", False) + t.expect_output_line("do_empty all") t.expect_output_line("Executing raw command directly", False) + if "\n%s\n" % whitespace not in t.stdout(): + BoostBuild.annotation("failure", "Whitespace action content not found " + "on stdout.") + t.fail_test(1, dump_difference=False) t.cleanup()