diff --git a/package.json b/package.json index 18b5668..d454cc8 100644 --- a/package.json +++ b/package.json @@ -13,12 +13,12 @@ "test": "tap test" }, "dependencies": { - "nomnom": "1.6.x", - "colors": "0.5.x", - "minimatch": "~0.2.9" + "colors": "^1.1.2", + "minimatch": "^3.0.4", + "nomnom": "^1.8.1" }, "devDependencies": { - "tape": "~0.2.2" + "tape": "^4.7.0" }, "bin": { "replace": "./bin/replace.js", diff --git a/test/sanity.js b/test/sanity.js index 3948f6d..b61db60 100644 --- a/test/sanity.js +++ b/test/sanity.js @@ -1,5 +1,6 @@ var fs = require("fs"), test = require('tape'), + EOL = require('os').EOL, replace = require('../replace'); function getText(file) { @@ -68,7 +69,7 @@ test('multiline', function(t) { multiline: false }); - var expected = "abc\ndef"; + var expected = "abc"+EOL+"def"; t.equal(getText(file), expected, "$ shouldn't match without multiline"); replace({ @@ -78,7 +79,7 @@ test('multiline', function(t) { multiline: true }); - var expected = "abt\ndef"; + var expected = "abt"+EOL+"def"; t.equal(getText(file), expected, "with multiline, $ should match eol"); replace({ @@ -88,7 +89,7 @@ test('multiline', function(t) { multiline: true }); - var expected = "abc\ndef"; + var expected = "abc"+EOL+"def"; t.equal(getText(file), expected, "reverting worked"); }); diff --git a/test/test_files/test_numbers.txt b/test/test_files/test_numbers.txt new file mode 100644 index 0000000..2668199 --- /dev/null +++ b/test/test_files/test_numbers.txt @@ -0,0 +1 @@ +a123b \ No newline at end of file