tests/test-blackbox.t
changeset 38023 c3fd9a0f8277
parent 38022 48853a927757
child 39707 5abc47d4ca6b
--- a/tests/test-blackbox.t	Wed May 16 20:17:50 2018 +0900
+++ b/tests/test-blackbox.t	Wed May 16 20:22:23 2018 +0900
@@ -7,6 +7,9 @@
   > @command(b'crash', [], b'hg crash')
   > def crash(ui, *args, **kwargs):
   >     raise Exception("oops")
+  > @command(b'abort', [], b'hg abort')
+  > def abort(ui, *args, **kwargs):
+  >     raise error.Abort(b"oops")
   > EOF
   $ abspath=`pwd`/myextension.py
 
@@ -44,6 +47,14 @@
   1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add non-existent exited 1 after * seconds (glob)
   1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox
 
+abort exit code
+  $ rm ./.hg/blackbox.log
+  $ hg abort 2> /dev/null
+  [255]
+  $ hg blackbox -l 2
+  1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> abort exited 255 after * seconds (glob)
+  1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox -l 2
+
 unhandled exception
   $ rm ./.hg/blackbox.log
   $ hg crash 2> /dev/null