all: add tests for usage error exit code

This commit is contained in:
Terts Diepraam 2022-09-10 18:38:14 +02:00
parent 975a1d170d
commit 9177cb7b24
74 changed files with 371 additions and 0 deletions

View file

@ -12,3 +12,8 @@ fn test_arch_help() {
.succeeds()
.stdout_contains("architecture name");
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}

View file

@ -192,3 +192,8 @@ fn test_simple_format() {
.code_is(1)
.stderr_contains("extra operand 'c'");
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}

View file

@ -8,6 +8,11 @@ fn test_invalid_option() {
new_ucmd!().arg("-w").arg("/").fails();
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
static DIR: &str = "/dev";
// we should always get both arguments, regardless of whether --reference was used

View file

@ -561,6 +561,11 @@ fn test_no_operands() {
.usage_error("missing operand");
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_mode_after_dash_dash() {
let (at, ucmd) = at_and_ucmd!();

View file

@ -78,6 +78,11 @@ fn test_invalid_option() {
new_ucmd!().arg("-w").arg("-q").arg("/").fails();
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_chown_only_owner() {
// test chown username file.txt

View file

@ -2,6 +2,11 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(125);
}
#[test]
fn test_missing_operand() {
let result = new_ucmd!().run();

View file

@ -2,6 +2,11 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_single_file() {
new_ucmd!()

View file

@ -2,6 +2,11 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn ab_no_args() {
new_ucmd!()

View file

@ -7,6 +7,11 @@ fn generate(from: u32, to: u32) -> String {
(from..to).fold(String::new(), |acc, v| format!("{}{}\n", acc, v))
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_stdin() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -39,6 +39,11 @@ static COMPLEX_SEQUENCE: &TestedSequence = &TestedSequence {
sequence: "9-,6-7,-2,4",
};
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_byte_sequence() {
for param in ["-b", "--bytes", "--byt"] {

View file

@ -5,6 +5,11 @@ use crate::common::util::*;
#[cfg(all(unix, not(target_os = "macos")))]
use rust_users::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_date_email() {
for param in ["--rfc-email", "--rfc-e", "-R"] {

View file

@ -75,6 +75,11 @@ fn build_ascii_block(n: usize) -> Vec<u8> {
(0..=127).cycle().take(n).collect()
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
// Sanity Tests
#[test]
fn version() {

View file

@ -3,6 +3,11 @@ use std::collections::HashSet;
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_df_compatible_no_size_arg() {
new_ucmd!().arg("-a").succeeds();

View file

@ -4,6 +4,11 @@ use crate::common::util::*;
extern crate dircolors;
use self::dircolors::{guess_syntax, OutputFmt, StrUtils};
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_shell_syntax() {
use std::env;

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_path_with_trailing_slashes() {
new_ucmd!()

View file

@ -41,6 +41,11 @@ fn _du_basics(s: &str) {
assert_eq!(s, answer);
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_du_basics_subdir() {
let ts = TestScenario::new(util_name!());

View file

@ -5,6 +5,11 @@ use std::env;
use std::path::Path;
use tempfile::tempdir;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(125);
}
#[test]
fn test_env_help() {
new_ucmd!()

View file

@ -2,6 +2,11 @@ use crate::common::util::*;
use uucore::display::Quotable;
// spell-checker:ignore (ToDO) taaaa tbbbb tcccc
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_with_tab() {
new_ucmd!()

View file

@ -27,6 +27,11 @@ use self::sieve::Sieve;
const NUM_PRIMES: usize = 10000;
const NUM_TESTS: usize = 100;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_parallel() {
use hex_literal::hex;

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_fmt() {
let result = new_ucmd!().arg("one-word-per-line.txt").run();

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_default_80_column_wrap() {
new_ucmd!()

View file

@ -9,6 +9,12 @@ use crate::common::util::*;
const VERSION_MIN_MULTIPLE_USERS: &str = "8.31"; // this feature was introduced in GNU's coreutils 8.31
#[test]
#[cfg(unix)]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
#[cfg(unix)]
fn test_groups() {

View file

@ -116,3 +116,8 @@ fn test_check_sha1() {
.stdout_is("testf: OK\n")
.stderr_is("");
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}

View file

@ -9,6 +9,11 @@ use crate::common::util::*;
static INPUT: &str = "lorem_ipsum.txt";
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_stdin_default() {
new_ucmd!()

View file

@ -28,3 +28,8 @@ fn test_hostname_full() {
.succeeds()
.stdout_contains(ls_short_res.stdout_str().trim());
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}

View file

@ -9,6 +9,11 @@ use crate::common::util::*;
const VERSION_MIN_MULTIPLE_USERS: &str = "8.31"; // this feature was introduced in GNU's coreutils 8.31
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
#[cfg(unix)]
fn test_id_no_specified_user() {

View file

@ -9,6 +9,11 @@ use std::process::Command;
#[cfg(any(target_os = "linux", target_os = "android"))]
use std::thread::sleep;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_install_basic() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -8,6 +8,11 @@ use std::{ffi::OsStr, os::unix::ffi::OsStrExt};
#[cfg(windows)]
use std::{ffi::OsString, os::windows::ffi::OsStringExt};
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn empty_files() {
new_ucmd!()

View file

@ -45,6 +45,11 @@ impl Drop for Target {
}
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_kill_list_all_signals() {
// Check for a few signals. Do not try to be comprehensive.

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[cfg(not(target_os = "android"))]
#[test]
fn test_link_existing_file() {

View file

@ -1,6 +1,11 @@
use crate::common::util::*;
use std::path::PathBuf;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_symlink_existing_file() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -1,6 +1,11 @@
use crate::common::util::*;
use std::env;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_normal() {
let result = new_ucmd!().run();

View file

@ -20,6 +20,11 @@ static TEST_DIR11: &str = "mkdir_test11/..";
#[cfg(not(windows))]
static TEST_DIR12: &str = "mkdir_test12";
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_mkdir_mkdir() {
new_ucmd!().arg(TEST_DIR1).succeeds();

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_create_fifo_missing_operand() {
new_ucmd!().fails().stderr_is("mkfifo: missing operand");

View file

@ -1,5 +1,11 @@
use crate::common::util::*;
#[test]
#[cfg(not(windows))]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[cfg(not(windows))]
#[test]
fn test_mknod_help() {

View file

@ -4,6 +4,11 @@ extern crate time;
use self::filetime::*;
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_mv_rename_dir() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_stdin_no_newline() {
new_ucmd!()

View file

@ -5,6 +5,11 @@ use std::thread::sleep;
// because stdin/stdout is not attached to a TTY.
// All that can be tested is the side-effects.
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(125);
}
#[test]
#[cfg(any(
target_os = "linux",

View file

@ -1,6 +1,11 @@
// spell-checker:ignore incorrectnumber
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_nproc() {
let nproc: u8 = new_ucmd!().succeeds().stdout_str().trim().parse().unwrap();

View file

@ -2,6 +2,11 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_should_not_round_floats() {
new_ucmd!()

View file

@ -24,6 +24,11 @@ static ALPHA_OUT: &str = "
// XXX We could do a better job of ensuring that we have a fresh temp dir to ourselves,
// not a general one full of other process leftovers.
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
// Test that od can read one file and dump with default format
#[test]
fn test_file() {

View file

@ -128,6 +128,11 @@ static EXAMPLE_DATA: &[TestData] = &[
},
];
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_combine_pairs_of_lines() {
for s in ["-s", "--serial"] {

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_default_mode() {
// test the default mode

View file

@ -12,6 +12,11 @@ use self::uucore::entries::{Locate, Passwd};
extern crate pinky;
pub use self::pinky::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_capitalize() {
assert_eq!("Zbnmasd", "zbnmasd".capitalize()); // spell-checker:disable-line

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn gnu_ext_disabled_rightward_no_ref() {
new_ucmd!()

View file

@ -4,6 +4,11 @@ use std::path::PathBuf;
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_default() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -8,6 +8,11 @@ static NOT_A_DIRECTORY: &str = "Not a directory";
#[cfg(windows)]
static NOT_A_DIRECTORY: &str = "The directory name is invalid.";
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_resolve() {
let scene = TestScenario::new(util_name!());

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_rm_one_file() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -20,6 +20,11 @@ const NOT_A_DIRECTORY: &str = "The directory name is invalid.";
#[cfg(not(windows))]
const NOT_A_DIRECTORY: &str = "Not a directory";
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_rmdir_empty_directory_no_parents() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -2,6 +2,11 @@
use crate::common::util::*;
use std::io::Read;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_hex_rejects_sign_after_identifier() {
new_ucmd!()

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_shred_remove() {
let scene = TestScenario::new(util_name!());

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_output_is_random_permutation() {
let input_seq = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

View file

@ -119,6 +119,11 @@ impl RandomFile {
}
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_split_default() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -10,6 +10,11 @@ use crate::common::util::*;
extern crate stat;
pub use self::stat::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_scanners() {
assert_eq!(Some((-5, 2)), "-5zxc".scan_num::<i32>());

View file

@ -2,6 +2,11 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
#[ignore = "Fails because cargo test does not run in a tty"]
fn runs() {

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_bsd_single_file() {
new_ucmd!()

View file

@ -3,6 +3,11 @@ extern crate tempfile;
use std::fs;
use tempfile::tempdir;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_sync_default() {
new_ucmd!().succeeds();

View file

@ -1,6 +1,11 @@
// spell-checker:ignore axxbxx bxxaxx axxx axxxx xxaxx xxax xxxxa axyz zyax zyxa
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_stdin_default() {
new_ucmd!()

View file

@ -30,6 +30,11 @@ static FOLLOW_NAME_SHORT_EXP: &str = "follow_name_short.expected";
#[cfg(target_os = "linux")]
static FOLLOW_NAME_EXP: &str = "follow_name.expected";
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
#[cfg(all(unix, not(target_os = "android")))] // FIXME: fix this test for Android
fn test_stdin_default() {

View file

@ -6,6 +6,11 @@ use crate::common::util::*;
// spell-checker:ignore nopipe
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_tee_processing_multiple_operands() {
// POSIX says: "Processing of at least 13 file operands shall be supported."

View file

@ -1,6 +1,11 @@
// spell-checker:ignore dont
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(125);
}
// FIXME: this depends on the system having true and false in PATH
// the best solution is probably to generate some test binaries that we can call for any
// utility that requires executing another program (kill, for instance)

View file

@ -59,6 +59,11 @@ fn str_to_filetime(format: &str, s: &str) -> FileTime {
FileTime::from_unix_time(offset_dt.unix_timestamp(), tm.nanosecond())
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_touch_default() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -1,6 +1,11 @@
// spell-checker:ignore aabbaa aabbcc aabc abbb abcc abcdefabcdef abcdefghijk abcdefghijklmn abcdefghijklmnop ABCDEFGHIJKLMNOPQRS abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFZZ abcxyz ABCXYZ abcxyzabcxyz ABCXYZABCXYZ acbdef alnum amzamz AMZXAMZ bbbd cclass cefgm cntrl compl dabcdef dncase Gzabcdefg PQRST upcase wxyzz xdigit xycde xyyye xyyz xyzzzzxyzzzz ZABCDEF Zamz Cdefghijkl Cdefghijklmn
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_to_upper() {
new_ucmd!()

View file

@ -1,5 +1,9 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_sort_call_graph() {
new_ucmd!()

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_uname() {
new_ucmd!().succeeds();

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn unexpand_init_0() {
new_ucmd!()

View file

@ -9,6 +9,11 @@ static SKIP_CHARS: &str = "skip-chars.txt";
static SKIP_FIELDS: &str = "skip-fields.txt";
static SORTED_ZERO_TERMINATED: &str = "sorted-zero-terminated.txt";
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_stdin_default() {
new_ucmd!()

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_unlink_file() {
let (at, mut ucmd) = at_and_ucmd!();

View file

@ -2,6 +2,11 @@ extern crate regex;
use self::regex::Regex;
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_uptime() {
TestScenario::new(util_name!())

View file

@ -1,5 +1,10 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_users_no_arg() {
new_ucmd!().succeeds();

View file

@ -2,6 +2,11 @@ use crate::common::util::*;
// spell-checker:ignore (flags) lwmcL clmwL ; (path) bogusfile emptyfile manyemptylines moby notrailingnewline onelongemptyline onelongword weirdchars
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_count_bytes_large_stdin() {
for n in [

View file

@ -7,6 +7,11 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[cfg(unix)]
#[test]
#[ignore = "issue #3219"]

View file

@ -5,6 +5,11 @@
use crate::common::util::*;
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
#[cfg(unix)]
fn test_normal() {

View file

@ -28,6 +28,11 @@ fn run(args: &[&str], expected: &[u8]) {
assert_eq!(buf.as_slice(), expected);
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_simple() {
run(&[], b"y\ny\ny\ny\n");