From a3405d63e8ec5c0acd105d8c4fe04efa31134b4f Mon Sep 17 00:00:00 2001 From: indexzero Date: Mon, 20 Jul 2015 16:44:21 -0700 Subject: [PATCH] [test] Show that \r\n based line-endings also work. --- test.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test.js b/test.js index e4f0892..70569c3 100644 --- a/test.js +++ b/test.js @@ -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')) @@ -60,5 +70,4 @@ tape('comments', function(t) { t.notOk(filter('test')) t.notOk(filter('foo/test')) t.end() - -}) \ No newline at end of file +})