Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions tests/by-util/test_readlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
//
// spell-checker:ignore regfile
use uutests::new_ucmd;
use uutests::path_concat;

use uutests::util::{TestScenario, get_root_path};
use uutests::{at_and_ucmd, util_name};
use uutests::{at_and_ucmd, new_ucmd, path_concat, util_name};

static GIBBERISH: &str = "supercalifragilisticexpialidocious";

Expand All @@ -15,6 +15,14 @@ static NOT_A_DIRECTORY: &str = "Not a directory";
#[cfg(windows)]
static NOT_A_DIRECTORY: &str = "The directory name is invalid.";

#[test]
fn test_no_args() {
new_ucmd!()
.fails_with_code(1)
.no_stdout()
.stderr_contains("readlink: missing operand");
}

#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails_with_code(1);
Expand Down
Loading