blob: 31190f58e73a69eb66b14fd80f263898469b1dec [file] [log] [blame]
Patrick Williamsf1e5d692016-03-30 15:21:19 -05001import argparse
2
3def selftest_reverse(args, config, basepath, workspace):
4 """Reverse the value passed to verify the plugin is executing."""
Patrick Williamsc0f7c042017-02-23 20:41:17 -06005 print(args.value[::-1])
Patrick Williamsf1e5d692016-03-30 15:21:19 -05006
7def register_commands(subparsers, context):
8 parser_build = subparsers.add_parser('selftest-reverse', help='Reverse value (for selftest)',
9 formatter_class=argparse.ArgumentDefaultsHelpFormatter)
10 parser_build.add_argument('value', help='Value to reverse')
11 parser_build.set_defaults(func=selftest_reverse)