aurum / test / globtopattern.vim

execute frawor#Setup('0.0', {'@aurum/edit': '0.0'})
let files=[
let failfile=curtest.'.fail'
for [g, r] in [['plugin/*.vim',                    ['plugin/aurum.vim']],
            \  ['plugin/{*.vim,aurum/{s,v}*.vim}', ['plugin/aurum.vim',
            \                                       'plugin/aurum/status.vim',
            \                                       'plugin/aurum/vimdiff.vim',
            \                                      ]],
            \  ['plugin/{*.vim,aurum/[sv]*.vim}',  ['plugin/aurum.vim',
            \                                       'plugin/aurum/status.vim',
            \                                       'plugin/aurum/vimdiff.vim',
            \                                      ]],
            \  ['python/[!a]*.py',                 []],
            \  ['**.py',                           ['python/']],
            \  ['**/.py',                          []],
            \  ['**/*.txt',                        ['aurum-addon-info.txt',
            \                                       'doc/aurum.txt']],
            \  ['python',                          ['python/']],
            \  ['python/',                         ['python/']],
            \  ['python////',                      ['python/']],
            \  ['test/{*',                         ['test/{}',
            \                                       'test/{this',
            \                                       'test/{this,that}']],
            \  ['test/{*,*',                       ['test/{this,that}']],
            \  ['test/}}',                         ['test/}}']],
            \  ['test/[',                          ['test/[']],
            \  ['test/]',                          ['test/]']],
            \  ['test/[^u]*',                      ['test/',
            \                                       'test/update.ok',
            \                                       'test/^.vim']],
    let p=s:_r.globtopat(g)
    let rr=filter(copy(files), 'v:val=~#p')
    if rr !=# r
        call writefile([g, p, string(r), string(rr)], failfile)
        echom 'Failed '.g.':'
        echom 'expected '.join(r).','
        echom 'but got '.join(rr)
        echom 'computed pattern: '.p.'.'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.