Add flags option to request JSON
Adds a `flags` parameter to the request JSON, appearing under the `compile.options` key (alongside such stalwarts as `compiler`, `timeout`, etc.). This is primarily to support `-file-line-error` as an option, but could have other uses as well. `flags` should be an array of strings, or absent. If supplied, the listed arguments are added to the base latexmk command.
This commit is contained in:
@@ -59,3 +59,21 @@ describe "LatexRunner", ->
|
||||
mainFile = command.slice(-1)[0]
|
||||
mainFile.should.equal "$COMPILE_DIR/main-file.tex"
|
||||
|
||||
describe "with a flags option", ->
|
||||
beforeEach ->
|
||||
@LatexRunner.runLatex @project_id,
|
||||
directory: @directory
|
||||
mainFile: @mainFile
|
||||
compiler: @compiler
|
||||
image: @image
|
||||
timeout: @timeout = 42000
|
||||
flags: ["-file-line-error", "-halt-on-error"]
|
||||
@callback
|
||||
|
||||
it "should include the flags in the command", ->
|
||||
command = @CommandRunner.run.args[0][1]
|
||||
flags = command.filter (arg) ->
|
||||
(arg == "-file-line-error") || (arg == "-halt-on-error")
|
||||
flags.length.should.equal 2
|
||||
flags[0].should.equal "-file-line-error"
|
||||
flags[1].should.equal "-halt-on-error"
|
||||
|
||||
Reference in New Issue
Block a user