1 |
|
2 |
|
3 | import 'babel-polyfill'
|
4 |
|
5 | import PatchSyncTeX from '../../src/Rules/PatchSyncTeX'
|
6 | import { initializeRule } from '../helpers'
|
7 |
|
8 | describe('PatchSyncTeX', () => {
|
9 | describe('constructCommand', () => {
|
10 | it('returns correct arguments and command options.', async (done) => {
|
11 | const { rule } = await initializeRule({
|
12 | RuleClass: PatchSyncTeX,
|
13 | parameters: [{
|
14 | filePath: 'KnitrConcordance-concordance.tex'
|
15 | }, {
|
16 | filePath: 'SyncTeX.synctex.gz'
|
17 | }]
|
18 | })
|
19 |
|
20 | expect(rule.constructCommand()).toEqual({
|
21 | args: ['Rscript', '-e', 'library(patchSynctex);patchSynctex(\'KnitrConcordance.tex\',syncfile=\'SyncTeX\')'],
|
22 | cd: '$ROOTDIR',
|
23 | severity: 'warning',
|
24 | outputs: ['$DIR_1/BASE_1']
|
25 | })
|
26 |
|
27 | done()
|
28 | })
|
29 | })
|
30 | })
|