Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Jun 7, 2024

This is a regression following lua regex change

Change happened at c8bfc13 and introduced regression by changing the condition.
This commits correctly put back the right condition

And also adds two tests that would have allow us to find this problem.

This PR also adds improvement in our test suites by adding a function to test the intermediate .tex file while testing the pdf output rendering with LaTeX too.

  • ensureLatexFileRegex is the equivalent of ensureTypstRegex.

    • keep-tex: true is required
    • Intermediate .tex file is correctly cleaned up.
    • Same behavior as with typst.
  • This was done by a refactoring with a new verifyKeepFileRegexMatches that could be used in our regular test suite (not smoke all). I moved function around to regroup so diff may not be easy to read. 🤔

  • Some error are also now thrown by the test suite to help find early some problem

    • Using in a smoke-all a verify function that does not exist was previously ignored.
      • meaning Nothing was tested in case of a typo for example
    • When ensureLatexFileRegex or ensureTypstRegex are used, respectively keep-tex: true and keep-typ: true are checked as they are required.

Hopefully, all the test will run ok !

cderv added 5 commits June 7, 2024 16:10
Change happened at c8bfc13 and introduced regression by changing the condition.
This commits correctly put back the right condition
…-all

previously it was silently ignored, now it will error out
…ng to pdf

Take the opportunity to refactor the test suite and adapt test
@cderv cderv marked this pull request as draft June 7, 2024 20:17
@cderv
Copy link
Collaborator Author

cderv commented Jun 7, 2024

All tests are fixed now. We add some non-working tests due to wrong verify function in tests specification. This won't happen.
I will also check the feature-matrix, against this branch

Edit: check of feature matrix is running here: https://github.com/quarto-dev/quarto-cli/actions/runs/9423312034

@cderv cderv marked this pull request as ready for review June 7, 2024 21:24
@cderv
Copy link
Collaborator Author

cderv commented Jun 7, 2024

Fixed some issues found in feature-format matrix docs: New run at https://github.com/quarto-dev/quarto-cli/actions/runs/9423620780

- "a[href=\"#tbl-2\"].quarto-xref"
dashboard: *dom-tests
revealjs: # reveal resolves anchors differently, using the section headings instead of the float ids
ensureHtmlElements:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a head up that fixing this is breaking the feature format matrix test
https://github.com/quarto-dev/quarto-cli/actions/runs/9423620780/job/25962387025#step:26:214

So I don't know if revealjs is just not well supported here, or something else but this is probably to fix in another issue.

This PR just surfaced it as previously there was no test, and it was silently not testing

@cderv cderv changed the title fixup regression regarding longtable handling fixup regression regarding longtable handling (and to tests fixes) Jun 7, 2024
@cderv cderv changed the title fixup regression regarding longtable handling (and to tests fixes) fixup regression regarding longtable handling (and some tests fixes) Jun 7, 2024
@cderv cderv requested review from cscheid and gordonwoodhull June 7, 2024 22:32
@cscheid
Copy link
Collaborator

cscheid commented Jun 10, 2024

All the test fixes are great. I wonder if we should fail every test that has a verify* key that isn't found...

Copy link
Collaborator

@cscheid cscheid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

All the test fixes indicate that we need to be better at preventing bad tests from being added.

I try to explicitly ensure a test is actually failing before fixing the code, but clearly some of the tests I added would never fail because of bad syntax. So we need stronger checks.

@cderv
Copy link
Collaborator Author

cderv commented Jun 10, 2024

I wonder if we should fail every test that has a verify* key that isn't found...

This is what I wanted to add. I used this pattern

} else {
            throw new Error(`Unknown verify function used: ${key} in file ${input} for format ${format}`) ;

So there will be an uncaught error I guess which will make the test fails already....

It is just an unhandled error. Live example here:
https://github.com/quarto-dev/quarto-cli/actions/runs/9423009019/job/25960520233?pr=9925#step:26:450

@cscheid
Copy link
Collaborator

cscheid commented Jun 10, 2024

It is just an unhandled error. Live example here: https://github.com/quarto-dev/quarto-cli/actions/runs/9423009019/job/25960520233?pr=9925#step:26:450

Ah, you (of course :)) did the thing I was suggesting it would be a good idea to do! I just missed it in the PR amid the other changes. Greaat!

@cderv cderv merged commit 9d868cf into main Jun 10, 2024
@cderv cderv deleted the fix/longtable-star branch June 10, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Biblatex related issue caused by Quarto update (probably due to Pandoc update from 3.1.13 to 3.2)

3 participants