Skip to content

Commit

Permalink
Merge pull request #2 from indexzero/alt-line-ending-test
Browse files Browse the repository at this point in the history
Show that \r\n based line-endings also work.
  • Loading branch information
mafintosh committed Jul 21, 2015
2 parents a9d697a + a3405d6 commit df0a0ce
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test.js
Expand Up @@ -30,6 +30,16 @@ tape('compile multiple lines', function(t) {
t.end()
})

tape('compile multiple lines with \\r', function(t) {
var filter = ignore.compile('a\r\nb\nc\r\nd');
t.ok(filter('a'))
t.ok(filter('b'))
t.ok(filter('c'))
t.ok(filter('d'))
t.notOk(filter('e'))
t.end()
})

tape('gitignore glob style', function(t) {
var filter = ignore.compile('test')
t.ok(filter('test'))
Expand Down Expand Up @@ -60,5 +70,4 @@ tape('comments', function(t) {
t.notOk(filter('test'))
t.notOk(filter('foo/test'))
t.end()

})
})

0 comments on commit df0a0ce

Please sign in to comment.