diff --git a/claptests/Cargo.toml b/claptests/Cargo.toml index 17ad0388..19d5ebb1 100644 --- a/claptests/Cargo.toml +++ b/claptests/Cargo.toml @@ -6,4 +6,4 @@ authors = ["Kevin K. "] [dependencies.clap] git = "https://github.com/kbknapp/clap-rs" -branch = "dev" +branch = "master" diff --git a/claptests/good_help b/claptests/good_help deleted file mode 100644 index bba50113..00000000 --- a/claptests/good_help +++ /dev/null @@ -1,21 +0,0 @@ -claptests 0.0.1 -Kevin K. -tests clap library - -USAGE: - claptests [FLAGS] [OPTIONS] [POSITIONAL] [SUBCOMMANDS] - -FLAGS: - -f,--flag tests flags - -v,--version Prints version information - -h,--help Prints this message - -OPTIONS: - -o ,--option=option tests options - -POSITIONAL ARGUMENTS: - positional tests positionals - -SUBCOMMANDS: - help Prints this message - subcmd tests subcommands diff --git a/claptests/run_test.py b/claptests/run_test.py index ac9d6414..076dbfc1 100755 --- a/claptests/run_test.py +++ b/claptests/run_test.py @@ -1,8 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 +import hashlib import sys import subprocess - failed = False def pass_fail(good, check): @@ -13,26 +13,7 @@ def pass_fail(good, check): return "Fail" def main(): - cmd_help = [['./target/release/claptests', '-h'], - ['./target/release/claptests', '--help'], - ['./target/release/claptests', 'help']] - proc = subprocess.Popen(cmd_help[0], stdout=subprocess.PIPE) - proc.wait() - out = proc.communicate()[0].decode('utf-8') - print("Help Flag:") - print("\tshort: {}".format(pass_fail(GOOD_HELP_HASH, out))) - proc = subprocess.Popen(cmd_help[1], stdout=subprocess.PIPE) - proc.wait() - out = proc.communicate()[0].decode('utf-8') - print("\tlong: {}".format(pass_fail(GOOD_HELP_HASH, out))) - proc = subprocess.Popen(cmd_help[2], stdout=subprocess.PIPE) - proc.wait() - out = proc.communicate()[0].decode('utf-8') - print("\tlong: {}".format(pass_fail(GOOD_HELP_HASH, out))) + pass - if failed: - return 1 - - if __name__ == '__main__': sys.exit(main()) \ No newline at end of file