summaryrefslogtreecommitdiffstats
path: root/misc/output_test.py
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2018-11-05 17:52:51 (GMT)
committerJan Niklas Hasse <jhasse@bixense.com>2018-11-05 17:52:51 (GMT)
commit3841023a44621e8d8133e9eb6e79e26481dc0bc3 (patch)
tree6b23c7c87c2dc898b3b084d5f75af8c5b3455ed7 /misc/output_test.py
parent4baea2b826aa5fd356a1f90fef7a7e4a40b4d0b1 (diff)
downloadNinja-3841023a44621e8d8133e9eb6e79e26481dc0bc3.zip
Ninja-3841023a44621e8d8133e9eb6e79e26481dc0bc3.tar.gz
Ninja-3841023a44621e8d8133e9eb6e79e26481dc0bc3.tar.bz2
Add test for #1418 (edge output should match status)
Diffstat (limited to 'misc/output_test.py')
-rwxr-xr-xmisc/output_test.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/misc/output_test.py b/misc/output_test.py
index 0651698..d19cebc 100755
--- a/misc/output_test.py
+++ b/misc/output_test.py
@@ -31,6 +31,27 @@ def run(build_ninja, flags='', pipe=False):
return final_output
class Output(unittest.TestCase):
+ def test_issue_1418(self):
+ self.assertEqual(run(
+'''rule echo
+ command = sleep 0.$delay && echo $out
+ description = echo $out
+
+build a: echo
+ delay = 3
+build b: echo
+ delay = 2
+build c: echo
+ delay = 1
+'''),
+'''[1/3] echo c\x1b[K
+c
+[2/3] echo b\x1b[K
+b
+[3/3] echo a\x1b[K
+a
+''')
+
def test_issue_1214(self):
print_red = '''rule echo
command = printf '\x1b[31mred\x1b[0m'