--- a/test.py Sat Jun 27 20:52:03 2009 +0300
+++ b/test.py Sat Jun 27 20:52:15 2009 +0300
@@ -17,21 +17,26 @@
Let's try to do that (damn, but what?!)
'''
+ if opts.get('pass'):
+ return
# test ui
ui.write('what the?!\n')
ui.warn('this is stderr\n')
ui.status('this would be invisible in quiet mode\n')
ui.note('this would be visible only in verbose mode\n')
ui.write('%s, %s\n' % (args, opts))
+ if opts.get('exit'):
+ sys.exit(opts['exit'])
cmdtable = {
- 'simple':
+ '^simple':
(simple,
[('t', 'test', False, 'just test execution')],
'[-t] ...'),
- 'complex':
+ 'complex|hard':
(complex_,
- [],
+ [('p', 'pass', False, 'don\'t run the command'),
+ ('', 'exit', 0, 'exit with supplied code (default: 0)')],
'')}
if __name__ == '__main__':