1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

add some tests for Clap's InferLongArgs setting

This commit is contained in:
Terts Diepraam 2022-01-29 01:03:28 +01:00
parent 5f1933a89f
commit 2412e4cbf7
11 changed files with 166 additions and 110 deletions

View file

@ -26,7 +26,7 @@ fn test_base64_encode_file() {
#[test]
fn test_decode() {
for decode_param in &["-d", "--decode"] {
for decode_param in &["-d", "--decode", "--dec"] {
let input = "aGVsbG8sIHdvcmxkIQ=="; // spell-checker:disable-line
new_ucmd!()
.arg(decode_param)
@ -48,7 +48,7 @@ fn test_garbage() {
#[test]
fn test_ignore_garbage() {
for ignore_garbage_param in &["-i", "--ignore-garbage"] {
for ignore_garbage_param in &["-i", "--ignore-garbage", "--ig"] {
let input = "aGVsbG8sIHdvcmxkIQ==\0"; // spell-checker:disable-line
new_ucmd!()
.arg("-d")
@ -61,7 +61,7 @@ fn test_ignore_garbage() {
#[test]
fn test_wrap() {
for wrap_param in &["-w", "--wrap"] {
for wrap_param in &["-w", "--wrap", "--wr"] {
let input = "The quick brown fox jumps over the lazy dog.";
new_ucmd!()
.arg(wrap_param)