Skip to content

Fix failing tests #6871

@cderv

Description

@cderv

Since we merge #6620 I believe and also #6851 we have a few issues - possible an interaction between both of them:

  • quarto render docs\smoke-all\crossrefs\float\jats\jats-knitr-table-captions-1.qmd --to jats failling on windows. @cscheid same reason as other tests when there is a warning as output of a chunk.

    intermediate md
     ---
     title: Knitr Table Test
     format: jats
     keep-md: true
     _quarto:
       tests:
         jats:
           ensureJatsXpath:
             - 
               - '//fig//fig[@id="tbl-cars"]//table'
               - '//fig//fig[@id="tbl-cars"]//caption'
               - '//fig//fig[@id="tbl-pressure"]//table'
               - '//fig//fig[@id="tbl-pressure"]//caption'
               - '//fig[@id="tbl-tables"]/caption'
             - []
     ---
     
     
     ::: {#tbl-tables .cell layout-ncol="2" tbl-cap='Tables'}
     
     ```{.r .cell-code}
     library(knitr)
     ```
     
     ::: {.cell-output .cell-output-stderr}
     
     ```
     Warning: le package 'knitr' a été compilé avec la version R 4.2.3
     ```
     
     
     :::
     
     ```{.r .cell-code}
     kable(head(cars), caption = "Cars {#tbl-cars}")
     ```
     
     ::: {.cell-output-display}
     
     
     Table: Cars {#tbl-cars}
     
     | speed| dist|
     |-----:|----:|
     |     4|    2|
     |     4|   10|
     |     7|    4|
     |     7|   22|
     |     8|   16|
     |     9|   10|
     
     
     :::
     
     ```{.r .cell-code}
     kable(head(pressure), caption = "Pressure {#tbl-pressure}")
     ```
     
     ::: {.cell-output-display}
     
     
     Table: Pressure {#tbl-pressure}
     
     | temperature| pressure|
     |-----------:|--------:|
     |           0|   0.0002|
     |          20|   0.0012|
     |          40|   0.0060|
     |          60|   0.0300|
     |          80|   0.0900|
     |         100|   0.2700|
     
     
     :::
     :::
     
     
     See @tbl-cars for more information.
     
     </details>
    
  • quarto render docs\smoke-all\crossrefs\float\asciidoc\asciidoc-knitr-table-captions-1.qmd --to asciidoc. Same reason

    Intermediate markdown
     ---
     title: Knitr Table Test
     format: asciidoc
     keep-md: true
     _quarto:
       tests:
         asciidoc:
           ensureFileRegexMatches:
             # The checks here are looser than I'd like, because checking for asciidoc
             # nested structures in line-by-line regexes seems impossible, but this
             # is the only smoke-all test we can run in asciidoc.. 
             #
             # TODO this is a problem.
             - 
               - "\\[\\[tbl-cars\\]\\]"
               - "\\[\\[tbl-pressure\\]\\]"
               - "\\[#tbl-tables\\]" # TODO understand the difference between [[foo]] and [#foo]. From my reading of the asciidoc docs it seems ok but we should double-check.
               - "\\. Tables"
               - "\\. Cars"
               - "\\. Pressure"
             - []
     ---
     
     
     ::: {#tbl-tables .cell layout-ncol="2" tbl-cap='Tables'}
     
     ```{.r .cell-code}
     library(knitr)
     ```
     
     ::: {.cell-output .cell-output-stderr}
     
     ```
     Warning: le package 'knitr' a été compilé avec la version R 4.2.3
     ```
     
     
     :::
     
     ```{.r .cell-code}
     kable(head(cars), caption = "Cars {#tbl-cars}")
     ```
     
     ::: {.cell-output-display}
     
     
     Table: Cars {#tbl-cars}
     
     | speed| dist|
     |-----:|----:|
     |     4|    2|
     |     4|   10|
     |     7|    4|
     |     7|   22|
     |     8|   16|
     |     9|   10|
     
     
     :::
     
     ```{.r .cell-code}
     kable(head(pressure), caption = "Pressure {#tbl-pressure}")
     ```
     
     ::: {.cell-output-display}
     
     
     Table: Pressure {#tbl-pressure}
     
     | temperature| pressure|
     |-----------:|--------:|
     |           0|   0.0002|
     |          20|   0.0012|
     |          40|   0.0060|
     |          60|   0.0300|
     |          80|   0.0900|
     |         100|   0.2700|
     
     
     :::
     :::
     
     
     See @tbl-cars for more information.
  • quarto render docs\smoke-all\lightbox\lightbox-explicit.qmd --to html. Issue with Lightbox (671ad9c)

    Lua error
     Error running filter C:/Users/chris/Documents/DEV_R/quarto-cli/src/resources/filters/main.lua:
     ...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:38: bad argument #1 to 'for iterator' (table expected, got nil)
     stack traceback:
             ...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:38: in function 'run_emulated_filter'
             ...R/quarto-cli/src/resources/filters/./layout/lightbox.lua:165: in function <...R/quarto-cli/src/resources/filters/./layout/lightbox.lua:159>
             (...tail calls...)
             [C]: in ?
             [C]: in method 'walk'
             ...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:61: in function <...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:51>
             (...tail calls...)
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:36: in local 'callback'
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:49: in upvalue 'run_emulated_filter_chain'
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:84: in function <.../quarto-cli/src/resources/filters/./ast/runemulation.lua:81>
     stack traceback:
             ...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:61: in function <...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:51>
             (...tail calls...)
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:36: in local 'callback'
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:49: in upvalue 'run_emulated_filter_chain'
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:84: in function <.../quarto-cli/src/resources/filters/./ast/runemulation.lua:81>
     ERROR: Error
         at renderFiles (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-files.ts:334:23)
         at eventLoopTick (ext:core/01_core.js:181:11)
         at async render (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-shared.ts:98:18)
         at async Command.fn (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/cmd.ts:212:26)
         at async Command.execute (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/vendor/deno.land/x/cliffy@v0.25.4/command/command.ts:1790:7)
         at async quarto (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/quarto.ts:135:3)
         at async file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/quarto.ts:167:5
     ```
     
     </details>
    
    
  • quarto render docs\smoke-all\lightbox\options.qmd --to html. Same as above (bbb46a4)

    Lua error
     Error running filter C:/Users/chris/Documents/DEV_R/quarto-cli/src/resources/filters/main.lua:
     ...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:38: bad argument #1 to 'for iterator' (table expected, got nil)
     stack traceback:
             ...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:38: in function 'run_emulated_filter'
             ...R/quarto-cli/src/resources/filters/./layout/lightbox.lua:165: in function <...R/quarto-cli/src/resources/filters/./layout/lightbox.lua:159>
             (...tail calls...)
             [C]: in ?
             [C]: in method 'walk'
             ...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:61: in function <...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:51>
             (...tail calls...)
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:36: in local 'callback'
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:49: in upvalue 'run_emulated_filter_chain'
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:84: in function <.../quarto-cli/src/resources/filters/./ast/runemulation.lua:81>
     stack traceback:
             ...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:61: in function <...R/quarto-cli/src/resources/filters/./ast/customnodes.lua:51>
             (...tail calls...)
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:36: in local 'callback'
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:49: in upvalue 'run_emulated_filter_chain'
             .../quarto-cli/src/resources/filters/./ast/runemulation.lua:84: in function <.../quarto-cli/src/resources/filters/./ast/runemulation.lua:81>
     ERROR: Error
         at renderFiles (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-files.ts:334:23)
         at eventLoopTick (ext:core/01_core.js:181:11)
         at async render (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-shared.ts:98:18)
         at async Command.fn (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/cmd.ts:212:26)
         at async Command.execute (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/vendor/deno.land/x/cliffy@v0.25.4/command/command.ts:1790:7)
         at async quarto (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/quarto.ts:135:3)
         at async file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/quarto.ts:167:5
    

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcrossref

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions