Skip to content

Commit

Permalink
test verifying that accented chars work in nocase:true
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jan 17, 2023
1 parent 58c6735 commit 1029391
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 11 deletions.
32 changes: 32 additions & 0 deletions tap-snapshots/test/basic.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -428,3 +428,35 @@ exports[`test/basic.js TAP basic tests > makeRe {a,*(b|c,d)} 1`] = `
exports[`test/basic.js TAP basic tests > makeRe {a,*(b|{c,d})} 1`] = `
/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/
`

exports[`test/basic.js TAP basic tests > makeRe Å 1`] = `
/^(?:Å)$/i
`

exports[`test/basic.js TAP basic tests > makeRe Å 2`] = `
/^(?:Å)$/
`

exports[`test/basic.js TAP basic tests > makeRe Å 3`] = `
/^(?:Å)$/
`

exports[`test/basic.js TAP basic tests > makeRe Å 4`] = `
/^(?:Å)$/i
`

exports[`test/basic.js TAP basic tests > makeRe å 1`] = `
/^(?:å)$/
`

exports[`test/basic.js TAP basic tests > makeRe å 2`] = `
/^(?:å)$/i
`

exports[`test/basic.js TAP basic tests > makeRe å 3`] = `
/^(?:å)$/i
`

exports[`test/basic.js TAP basic tests > makeRe å 4`] = `
/^(?:å)$/
`
25 changes: 14 additions & 11 deletions test/patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,19 +314,22 @@ module.exports = [

// https://github.com/isaacs/node-glob/issues/415
() => {
files = [
'ac',
'abc',
'acd',
'acc',
'acd',
'adc',
'bbc',
'bac',
'bcc',
]
files = ['ac', 'abc', 'acd', 'acc', 'acd', 'adc', 'bbc', 'bac', 'bcc']
},
['+(a)!(b)+(c)', ['ac', 'acc', 'adc']],

// https://github.com/isaacs/node-glob/issues/394
() => (files = ['å']),
['å', ['å']],
['å', ['å'], { nocase: true }],
['Å', ['å'], { nocase: true }],
['Å', [], {}],

() => (files = ['Å']),
['Å', ['Å']],
['å', ['Å'], { nocase: true }],
['Å', ['Å'], { nocase: true }],
['å', [], {}],
]

Object.defineProperty(module.exports, 'files', {
Expand Down

0 comments on commit 1029391

Please sign in to comment.