Match strings using bash. Does not work on windows, and does not read from the file system. This library requires that Bash 4.3 or higher is installed and is mostly used for checking parity in unit tests.
Hi All,
I am running jobs on travis-ci but found that jobs on macOS are failing with assertion error.
Detailed logs
Worker information
0.60s0.01s0.02s
system_info
Build system information
0.01s0.01s0.53s0.01s0.01s0.01s0.01s0.01s0.07s0.06s0.06s0.01s0.10s0.01s0.28s0.22s0.01s0.02s0.03s0.01s3.63s
1.39s0.05s0.01s0.01s0.01s0.01s0.01s0.01s0.01s0.01s0.01s0.01s0.01s0.01s0.01s
git.checkout
0.53s$ git clone --depth=50 --branch=master https://github.com/kishorkunal-raj/bash-match.git kishorkunal-raj/bash-match
0.02s
nvm.install
8.40s$ nvm install node
cache.1
Setting up build cache
cache.npm
$ node --version
v15.4.0
$ npm --version
7.0.15
$ nvm --version
0.37.2
install.npm
7.33s$ npm install
2.48s$ npm test
[email protected] test
mocha
running extglob against minimatch tests
1) should match "a/b/c" with "/c"
✓ should not match "a/b/c" with "/"
2) should match "a/b/c/" with "/"
✓ should match ".a" with "."
✓ should not match "(a|b[)" with "(a|b[)"
✓ should match "a" with "(a|b[)"
✓ should match "b[" with "(a|b[)"
✓ should not match "123abc" with "abd+(e|f)"
✓ should not match "123abc" with "ab?(e|f)"
✓ should not match "a" with "!(a)"
✓ should match "a" with "@(a)"
✓ should not match "a" with "@(b)"
✓ should match "a" with "(a)"
✓ should match "a" with "+(a)"
✓ should match "a" with "?"
✓ should match "a" with "?(a|b)"
✓ should not match "a" with "??"
✓ should match "a" with "a?(a|b)"
✓ should match "a" with "a?(x)"
✓ should not match "a" with "a??b"
✓ should not match "a" with "b?(a|b)"
✓ should match "a." with "!(.a|.b|.c)"
✓ should match "a." with "!(.a|.b|.c)"
✓ should match "a." with ".!(a)"
✓ should match "a." with ".!(a|b|c)"
✓ should not match "a." with ".+(b|d)"
✓ should not match "a.a" with "!(.[a-b])"
✓ should not match "a.a" with "!(.a|.b|.c)"
✓ should not match "a.a" with "!([a-b].[a-b])"
✓ should not match "a.a" with "!.(a|b)"
✓ should not match "a.a" with "!.(a|b)"
✓ should not match "a.a" with "@(a|d).(a|b)"
✓ should match "a.a" with "!(.a|.b|.c)"
✓ should not match "a.a" with ".!(a)"
✓ should not match "a.a" with ".+(b|d)"
✓ should not match "a.a.a" with "!(.[a-b])"
✓ should not match "a.a.a" with "!([a-b].[a-b])"
✓ should not match "a.a.a" with "!.(a|b)"
✓ should not match "a.a.a" with "!.(a|b)"
✓ should match "a.a.a" with ".!(a)"
✓ should not match "a.a.a" with ".+(b|d)"
✓ should match "a.abcd" with "!(.a|.b|.c)"
✓ should match "a.abcd" with "!(.a|.b|.c)"
✓ should match "a.abcd" with "!(.a|.b|.c)"
✓ should match "a.abcd" with "!(.a|.b|.c)"
✓ should match "a.abcd" with ".!(a|b|c)"
✓ should match "a.abcd" with ".!(a|b|c)"
✓ should not match "a.b" with "!(.)"
✓ should not match "a.b" with "!(.[a-b])"
✓ should not match "a.b" with "!([a-b].[a-b])"
✓ should not match "a.b" with "!.(a|b)"
✓ should not match "a.b" with "!.(a|b)"
✓ should not match "a.b" with "@(a|d).(a|b)"
✓ should match "a.b" with "!(.a|.b|.c)"
✓ should match "a.b" with ".!(a)"
✓ should match "a.b" with ".+(b|d)"
✓ should not match "a.bb" with "!(.[a-b])"
✓ should not match "a.bb" with "!([a-b].[a-b])"
✓ should not match "a.bb" with "!.(a|b)"
✓ should not match "a.bb" with "!.(a|b)"
✓ should not match "a.bb" with "@(a|d).(a|b)"
✓ should match "a.bb" with ".+(b|d)"
✓ should match "a.c" with "!(.a|.b|.c)"
✓ should match "a.c.d" with "!(.a|.b|.c)"
✓ should match "a.c.d" with "!(.a|.b|.c)"
✓ should match "a.c.d" with ".!(a|b|c)"
✓ should match "a.ccc" with "!(.[a-b])"
✓ should match "a.ccc" with "!([a-b].[a-b])"
✓ should not match "a.ccc" with "!.(a|b)"
✓ should not match "a.ccc" with "!.(a|b)"
✓ should not match "a.ccc" with ".+(b|d)"
✓ should not match "a.js" with "!(.js)"
✓ should match "a.js" with "!(.js)"
✓ should not match "a.js" with ".!(js)"
✓ should not match "a.js.js" with "!(.js)"
✓ should match "a.js.js" with "!(.js)"
✓ should match "a.js.js" with ".!(js)"
✓ should match "a.md" with "!(.js)"
✓ should match "a.md" with "!(.js)"
✓ should match "a.md" with ".!(js)"
✓ should match "aa" with "!(a)"
✓ should not match "aa" with "?"
✓ should not match "aa" with "@(a)b"
✓ should not match "aa" with "a??b"
✓ should match "aaac" with "(@(a))a@(c)"
✓ should not match "aab" with "?"
✓ should not match "aab" with "??"
✓ should not match "aab" with "@(c)b"
✓ should not match "aab" with "a??b"
✓ should match "aaab" with "a??b"
✓ should match "aac" with "(@(a))a@(c)"
✓ should match "ab" with "!(.*)"
✓ should not match "ab" with "@(a+|b)+"
✓ should not match "ab" with "a!(@(b|B))"
✓ should not match "aB" with "a!(@(b|B))"
3) should match "ab" with "ab(e|f)"
✓ should not match "ab" with "ab**(e|f)g"
✓ should not match "ab" with "ab*+(e|f)"
✓ should not match "ab" with "abd+(e|f)"
✓ should not match "ab" with "ab?(e|f)"
✓ should match "ab]" with "a!(@(b|B))"
4) should match "abab" with "ab**(e|f)"
✓ should match "abb" with "!(.)"
✓ should match "abbcd" with "@(ab|a*(b))(c)d"
✓ should match "aBc" with "a!(@(b|B))"
✓ should match "abcd" with "?@(a|b)@(c)d"
✓ should match "abcd" with "@(ab|a*@(b))(c)d"
✓ should not match "abcdef" with "@(a+|b)"
✓ should not match "abcdef" with "@(a+|b)+"
5) should match "abcdef" with "ab**(e|f)"
✓ should not match "abcdef" with "ab**(e|f)g"
✓ should match "abcdef" with "ab*+(e|f)"
✓ should match "abcdef" with "abd+(e|f)"
✓ should not match "abcdef" with "ab?(e|f)"
✓ should not match "abcfef" with "@(a+|b)"
✓ should not match "abcfef" with "@(a+|b)+"
6) should match "abcfef" with "ab**(e|f)"
✓ should not match "abcfef" with "ab**(e|f)g"
✓ should match "abcfef" with "ab+(e|f)"
✓ should not match "abcfef" with "abd+(e|f)"
✓ should match "abcfef" with "ab?(e|f)"
✓ should not match "abcfefg" with "@(a+|b)"
✓ should not match "abcfefg" with "@(a+|b)+"
7) should match "abcfefg" with "ab**(e|f)"
✓ should not match "abcfefg" with "abd+(e|f)"
✓ should not match "abcfefg" with "ab?(e|f)"
✓ should not match "abd" with "@(a+|b)"
✓ should not match "abd" with "@(a+|b)+"
✓ should match "abd" with "a!(@(b|B))"
✓ should not match "abd" with "a!(@(b|B))d"
8) should match "abd" with "ab**(e|f)"
✓ should not match "abd" with "abd+(e|f)"
✓ should match "abd" with "ab?(e|f)"
✓ should not match "abef" with "@(a+|b)"
✓ should not match "abef" with "@(a+|b)+"
✓ should not match "abef" with "(a+|b)"
9) should match "abef" with "ab**(e|f)"
✓ should not match "abef" with "ab**(e|f)g"
✓ should match "abef" with "ab*+(e|f)"
✓ should not match "abef" with "abd+(e|f)"
✓ should match "abef" with "ab?(e|f)"
✓ should match "ac" with "(@(a))a@(c)"
✓ should match "ac" with "a!(@(b|B))"
✓ should not match "acd" with "@(a+|b)"
✓ should not match "acd" with "@(a+|b)+"
✓ should match "acd" with "@(ab|a*(b))(c)d"
✓ should match "acd" with "a!(@(b|B))"
✓ should match "acd" with "a!(@(b|B))d"
✓ should not match "acd" with "abd+(e|f)"
✓ should not match "acd" with "ab?(e|f)"
✓ should match "ax" with "?(a|b)"
✓ should not match "ax" with "a?(b*)"
✓ should match "b" with "@(a+|b)"
✓ should match "b/a" with "@(b/a)"
✓ should not match "b/b" with "@(b/a)"
✓ should not match "b/c" with "@(b/a)"
✓ should match "ba" with "b?(a|b)"
✓ should not match "baaac" with "(@(a))a@(c)"
✓ should not match "bar" with "@(foo)"
✓ should not match "bar" with "@(foo)b"
✓ should not match "baz" with "@(foo)"
✓ should not match "baz" with "@(foo)b"
✓ should not match "bb" with "a?(a|b)"
✓ should not match "c" with "(@(a))a@(c)"
✓ should not match "c.a" with "!(.[a-b])"
✓ should match "c.a" with "!([a-b].[a-b])"
✓ should not match "c.a" with "!.(a|b)"
✓ should not match "c.a" with "!.(a|b)"
✓ should not match "c.a" with ".!(a)"
✓ should not match "c.a" with ".+(b|d)"
✓ should match "c.c" with "!(.a|.b|.c)"
✓ should match "c.ccc" with "!(.[a-b])"
✓ should match "c.ccc" with "!([a-b].[a-b])"
✓ should not match "c.js" with "!(.js)"
✓ should match "c.js" with "!(.js)"
✓ should not match "c.js" with ".!(js)"
✓ should not match "cow" with ".!(.)"
✓ should not match "d.a.d" with "!(.[a-b])"
✓ should match "d.a.d" with "!([a-b].[a-b])"
✓ should not match "d.a.d" with "!.(a|b)"
✓ should not match "d.a.d" with "!.(a|b)"
✓ should match "d.a.d" with ".!(a)"
✓ should match "d.a.d" with ".+(b|d)"
✓ should match "d.d" with "!(.a|.b|.c)"
✓ should match "d.d" with "!(.a|.b|.c)"
✓ should match "d.d" with ".!(a|b|c)"
✓ should match "d.js.d" with "!(.js)"
✓ should match "d.js.d" with "!(.js)"
✓ should match "d.js.d" with ".!(js)"
✓ should match "e.e" with "!(.a|.b|.c)"
✓ should match "e.e" with "!(.a|.b|.c)"
✓ should match "e.e" with ".!(a|b|c)"
✓ should match "effgz" with "@(b+(c)d|e*(f)g?|?(h)i@(j|k))"
✓ should match "efgz" with "@(b+(c)d|e*(f)g?|?(h)i@(j|k))"
✓ should match "egz" with "@(b+(c)d|e*(f)g?|?(h)i@(j|k))"
✓ should not match "egz" with "@(b+(c)d|e+(f)g?|?(h)i@(j|k))"
✓ should match "egzefffgzbcdij" with "(b+(c)d|e(f)g?|?(h)i@(j|k))"
✓ should not match "f" with "!(f)"
✓ should not match "f" with "(!(f))"
✓ should not match "f" with "+(!(f))"
✓ should not match "f.a" with "!(.a|.b|.c)"
✓ should match "f.a" with "!(.a|.b|.c)"
✓ should not match "f.a" with ".!(a|b|c)"
✓ should match "f.f" with "!(.a|.b|.c)"
✓ should match "f.f" with "!(.a|.b|.c)"
✓ should match "f.f" with ".!(a|b|c)"
✓ should match "fff" with "!(f)"
✓ should match "fff" with "(!(f))"
✓ should match "fff" with "+(!(f))"
✓ should match "fffooofoooooffoofffooofff" with "((f)(o))"
✓ should match "ffo" with "(f*(o))"
✓ should match "fofo" with "(f(o))"
✓ should match "fofoofoofofoo" with "(fo|foo)"
✓ should match "foo" with "!(f)"
✓ should not match "foo" with "!(foo)"
✓ should match "foo" with "!(foo)"
✓ should not match "foo" with "!(foo)+"
✓ should not match "foo" with "!(foo)b*"
✓ should match "foo" with "!(x)"
✓ should match "foo" with "!(x)"
✓ should match "foo" with "(!(f))"
✓ should match "foo" with "(!(foo))"
✓ should match "foo" with "+(!(f))"
✓ should match "foo.js.js" with ".!(js)"
✓ should match "foo.js.js" with ".!(js)"
✓ should not match "foo.js.js" with ".!(js).!(js)"
✓ should not match "foo.js.js" with ".!(js)+"
✓ should not match "foob" with "!(foo)b"
✓ should match "foobar" with "!(foo)"
✓ should match "foobar" with "!(foo)"
✓ should not match "foobar" with "!(foo)b"
✓ should match "foobb" with "!(foo)b*"
✓ should match "foofoofo" with "@(foo|f|fo)(f|of+(o))"
✓ should match "fooofoofofooo" with "(f*(o))"
✓ should match "foooofo" with "(f(o))"
✓ should match "foooofof" with "(f(o))"
✓ should not match "foooofof" with "(f+(o))"
✓ should not match "foooofofx" with "(f*(o))"
✓ should match "foooxfooxfoxfooox" with "(f(o)x)"
✓ should match "foooxfooxfxfooox" with "(f(o)x)"
✓ should not match "foooxfooxofoxfooox" with "(f(o)x)"
✓ should match "foot" with "@(!(z*)|x)"
✓ should match "foox" with "@(!(z)|x)"
✓ should not match "mad.moo.cow" with "!(.).!(.)"
✓ should not match "mad.moo.cow" with ".!(.)"
✓ should match "Makefile" with "!(.c|.h|Makefile.in|config|README)"
✓ should not match "Makefile.in" with "!(.c|.h|Makefile.in|config*|README)"
✓ should not match "moo" with ".!(.)"
✓ should match "moo.cow" with "!(.).!(.)"
✓ should not match "moo.cow" with ".!(.)"
✓ should not match "mucca.pazza" with "mu!((c))?.pa!((z))?"
✓ should match "ofoofo" with "(of+(o))"
✓ should match "ofoofo" with "(of+(o)|f)"
✓ should not match "ofooofoofofooo" with "(f(o))"
✓ should match "ofoooxoofxo" with "((of*(o)x)o)"
✓ should match "ofoooxoofxoofoooxoofxo" with "((of*(o)x)o)"
✓ should not match "ofoooxoofxoofoooxoofxofo" with "((of*(o)x)o)"
✓ should match "ofoooxoofxoofoooxoofxoo" with "((of*(o)x)o)"
✓ should match "ofoooxoofxoofoooxoofxooofxofxo" with "((of*(o)x)o)"
✓ should match "ofxoofxo" with "((of*(o)x)o)"
✓ should match "oofooofo" with "(of|oof+(o))"
✓ should match "ooo" with "!(f)"
✓ should match "ooo" with "(!(f))"
✓ should match "ooo" with "+(!(f))"
✓ should not match "oxfoxfox" with "(oxf+(ox))"
✓ should match "oxfoxoxfox" with "(oxf+(ox))"
✓ should match "parse.y" with "!(.c|.h|Makefile.in|config*|README)"
✓ should not match "shell.c" with "!(.c|.h|Makefile.in|config*|README)"
✓ should not match "xfoooofof" with "(f(o))"
✓ should not match "zoot" with "@(!(z*)|x)"
✓ should match "zoox" with "@(!(z)|x)"
✓ should not match "zz" with "@(a+|b)"
263 passing (2s)
9 failing
running extglob against minimatch tests should match "a/b/c" with "/c":
AssertionError [ERR_ASSERTION]: should match "a/b/c" with "/c"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
running extglob against minimatch tests should match "a/b/c/" with "/":
AssertionError [ERR_ASSERTION]: should match "a/b/c/" with "/"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
running extglob against minimatch tests should match "ab" with "ab**(e|f)":
AssertionError [ERR_ASSERTION]: should match "ab" with "ab**(e|f)"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
running extglob against minimatch tests should match "abab" with "ab**(e|f)":
AssertionError [ERR_ASSERTION]: should match "abab" with "ab**(e|f)"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
running extglob against minimatch tests should match "abcdef" with "ab**(e|f)":
AssertionError [ERR_ASSERTION]: should match "abcdef" with "ab**(e|f)"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
running extglob against minimatch tests should match "abcfef" with "ab**(e|f)":
AssertionError [ERR_ASSERTION]: should match "abcfef" with "ab**(e|f)"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
running extglob against minimatch tests should match "abcfefg" with "ab**(e|f)":
AssertionError [ERR_ASSERTION]: should match "abcfefg" with "ab**(e|f)"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
running extglob against minimatch tests should match "abd" with "ab**(e|f)":
AssertionError [ERR_ASSERTION]: should match "abd" with "ab**(e|f)"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
running extglob against minimatch tests should match "abef" with "ab**(e|f)":
AssertionError [ERR_ASSERTION]: should match "abef" with "ab**(e|f)"
expected - actual
-false
+true
at Context. (test.js:298:14)
at processImmediate (node:internal/timers:463:21)
npm ERR! code 9
npm ERR! path /Users/travis/build/kishorkunal-raj/bash-match
npm ERR! command failed
npm ERR! command sh -c mocha
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/travis/.npm/_logs/2020-12-17T11_30_15_263Z-debug.log
The command "npm test" exited with 9.
cache.2
store build cache
Done. Your build exited with 1.
Will you please look into it and help me with the fix