tests/test-bundle2.t
changeset 20892 6fe95448596d
parent 20891 1c6cd23fc221
child 20946 e910336539f7
--- a/tests/test-bundle2.t	Mon Mar 24 13:02:02 2014 -0700
+++ b/tests/test-bundle2.t	Mon Mar 24 17:20:15 2014 -0700
@@ -72,9 +72,13 @@
   > def cmdunbundle2(ui, repo):
   >     """process a bundle2 stream from stdin on the current repo"""
   >     try:
-  >         bundle2.processbundle(repo, sys.stdin)
-  >     except KeyError, exc:
-  >         raise util.Abort('missing support for %s' % exc)
+  >         try:
+  >             bundle2.processbundle(repo, sys.stdin)
+  >         except KeyError, exc:
+  >             raise util.Abort('missing support for %s' % exc)
+  >     finally:
+  >         remains = sys.stdin.read()
+  >         ui.write('%i unread bytes\n' % len(remains))
   > 
   > @command('statbundle2', [], '')
   > def cmdstatbundle2(ui, repo):
@@ -385,6 +389,7 @@
   ignoring unknown advisory part 'test:math'
   part header size: 0
   end of bundle2 stream
+  0 unread bytes
 
 
   $ hg bundle2 --parts --unknown ../unknown.hg2
@@ -394,5 +399,6 @@
       Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
       Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
       Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
+  0 unread bytes
   abort: missing support for 'test:unknown'
   [255]