From 0b673f2f0184efa0111c4978a2a4159598dee7a6 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 7 Jan 2020 15:17:16 +0000 Subject: Remove argparse dependency As we have replaced argparse with structopt, we no longer need it as a dependency. This patch removes the dependency from Cargo.toml and deletes the included copy. Delete subrepo argparse/:argparse --- argparse/src/test_const.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 argparse/src/test_const.rs (limited to 'argparse/src/test_const.rs') diff --git a/argparse/src/test_const.rs b/argparse/src/test_const.rs deleted file mode 100644 index b12e3d8..0000000 --- a/argparse/src/test_const.rs +++ /dev/null @@ -1,28 +0,0 @@ -use parser::ArgumentParser; -use super::{PushConst}; -use test_parser::{check_ok}; - - -fn push_const(args: &[&str]) -> Vec { - let mut res = vec!(); - { - let mut ap = ArgumentParser::new(); - ap.refer(&mut res) - .add_option(&["-o", "--one"], PushConst(1), - "Add one to the list") - .add_option(&["-t", "--two"], PushConst(2), - "Add two to the list") - .add_option(&["-3", "--three"], PushConst(3), - "Add three to the list"); - check_ok(&ap, args); - } - return res; -} - -#[test] -fn test_push() { - assert_eq!(push_const(&["./argparse_test"]), vec!()); - assert_eq!(push_const(&["./argparse_test", "--one"]), vec!(1)); - assert_eq!(push_const(&["./argparse_test", "-3"]), vec!(3)); - assert_eq!(push_const(&["./argparse_test", "-oo3tt"]), vec!(1, 1, 3, 2, 2)); -} -- cgit v1.2.1