Skip to content
Permalink
Browse files

Merged PR 548: 622_ls_returns_zero

Defect

Related Work Items: #622

Related work items: #622
  • Loading branch information...
realms-mud committed Aug 6, 2019
1 parent 9927d54 commit 61edfb8f9d3d6e6d0a8658fd17e7654043452e47
Showing with 13 additions and 0 deletions.
  1. +6 −0 commands/wizard/ls.c
  2. +7 −0 tests/commands/wizard/lsTest.c
@@ -156,6 +156,12 @@ private nomask varargs int listFiles(string path, object initiator,
colorConfiguration, numFiles++);
}
}
if (!ret)
{
ret = 1;
tell_object(initiator, configuration->decorate("No files present.\n",
"message", "wizard commands", colorConfiguration));
}
tell_object(initiator, "\n");
}
else
@@ -106,3 +106,10 @@ void WildcardsWork()
ExpectTrue(Wizard->executeCommand("ls -l /lib/modules/b*"));
ExpectEq(5, sizeof(explode(Wizard->caughtMessages(), "\n")));
}

/////////////////////////////////////////////////////////////////////////////
void LsOfEmptyDirectoryDisplaysCorrectly()
{
ExpectTrue(Wizard->executeCommand("ls empty"));
ExpectSubStringMatch("No files present", Wizard->caughtMessages());
}

0 comments on commit 61edfb8

Please sign in to comment.
You can’t perform that action at this time.