mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Add multiline spec
This commit is contained in:
@@ -2394,6 +2394,22 @@ i = /test/; #FIXME\
|
||||
expect(results[0].replacements).toBe(6)
|
||||
})
|
||||
})
|
||||
|
||||
it('uses the multiline flag when searching', () => {
|
||||
const filePath = path.join(projectDir, 'sample.js')
|
||||
fs.copyFileSync(path.join(fixturesDir, 'sample.js'), filePath)
|
||||
|
||||
const results = []
|
||||
waitsForPromise(() =>
|
||||
atom.workspace.replace(/;$/gi, 'items', [filePath], result => results.push(result))
|
||||
)
|
||||
|
||||
runs(() => {
|
||||
expect(results).toHaveLength(1)
|
||||
expect(results[0].filePath).toBe(filePath)
|
||||
expect(results[0].replacements).toBe(8)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('when a buffer is already open', () => {
|
||||
|
||||
Reference in New Issue
Block a user