Skip to content

Commit

Permalink
Add a test for ls for a single file (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
freitagbr authored and nfischer committed Oct 18, 2017
1 parent 32972e0 commit 7cbce88
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/ls.js
Expand Up @@ -87,6 +87,14 @@ test('simple arg, with a trailing slash', t => {
t.is(result.length, 6);
});

test('simple arg, a file', t => {
const result = shell.ls('test/resources/ls/file1');
t.falsy(shell.error());
t.is(result.code, 0);
t.truthy(result.indexOf('test/resources/ls/file1') > -1);
t.is(result.length, 1);
});

test('no args, -A option', t => {
shell.cd('test/resources/ls');
const result = shell.ls('-A');
Expand Down

0 comments on commit 7cbce88

Please sign in to comment.