Add test for parsing '--numeric-uid-gid'.
@@ -354,7 +354,8 @@ mod test {
&flags::CREATED, &flags::ACCESSED,
&flags::HEADER, &flags::GROUP, &flags::INODE, &flags::GIT,
&flags::LINKS, &flags::BLOCKS, &flags::LONG, &flags::LEVEL,
- &flags::GRID, &flags::ACROSS, &flags::ONE_LINE, &flags::TREE ];
+ &flags::GRID, &flags::ACROSS, &flags::ONE_LINE, &flags::TREE,
+ &flags::NUM_UGID ];
macro_rules! test {
@@ -563,6 +564,7 @@ mod test {
test!(just_blocks: Mode <- ["--blocks"], None; Last => like Ok(Mode::Grid(_)));
test!(just_binary: Mode <- ["--binary"], None; Last => like Ok(Mode::Grid(_)));
test!(just_bytes: Mode <- ["--bytes"], None; Last => like Ok(Mode::Grid(_)));
+ test!(just_num_ugid: Mode <- ["--numeric-uid-gid"], None; Last => like Ok(Mode::Grid(_)));
#[cfg(feature = "git")]
test!(just_git: Mode <- ["--git"], None; Last => like Ok(Mode::Grid(_)));
@@ -574,6 +576,7 @@ mod test {
test!(just_blocks_2: Mode <- ["--blocks"], None; Complain => err OptionsError::Useless(&flags::BLOCKS, false, &flags::LONG));
test!(just_binary_2: Mode <- ["--binary"], None; Complain => err OptionsError::Useless(&flags::BINARY, false, &flags::LONG));
test!(just_bytes_2: Mode <- ["--bytes"], None; Complain => err OptionsError::Useless(&flags::BYTES, false, &flags::LONG));
+ test!(just_num_ugid2: Mode <- ["--numeric-uid-gid"], None; Complain => err OptionsError::Useless(&flags::NUM_UGID, false, &flags::LONG));
#[cfg(feature = "git")]
test!(just_git_2: Mode <- ["--git"], None; Complain => err OptionsError::Useless(&flags::GIT, false, &flags::LONG));
