Skip to content

Commit d0b0e2a

Browse files
authored
Merge pull request #9230 from cakebaker/readlink_add_test
readlink: test calling without args
2 parents 7bcf58d + f264a40 commit d0b0e2a

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

tests/by-util/test_readlink.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
//
33
// For the full copyright and license information, please view the LICENSE
44
// file that was distributed with this source code.
5+
//
56
// spell-checker:ignore regfile
6-
use uutests::new_ucmd;
7-
use uutests::path_concat;
7+
88
use uutests::util::{TestScenario, get_root_path};
9-
use uutests::{at_and_ucmd, util_name};
9+
use uutests::{at_and_ucmd, new_ucmd, path_concat, util_name};
1010

1111
static GIBBERISH: &str = "supercalifragilisticexpialidocious";
1212

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

18+
#[test]
19+
fn test_no_args() {
20+
new_ucmd!()
21+
.fails_with_code(1)
22+
.no_stdout()
23+
.stderr_contains("readlink: missing operand");
24+
}
25+
1826
#[test]
1927
fn test_invalid_arg() {
2028
new_ucmd!().arg("--definitely-invalid").fails_with_code(1);

0 commit comments

Comments
 (0)