mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
Merge pull request #9230 from cakebaker/readlink_add_test
readlink: test calling without args
This commit is contained in:
commit
d0b0e2a4f3
1 changed files with 11 additions and 3 deletions
|
|
@ -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";
|
||||
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue