Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more bibtex tests #1037

Merged
merged 3 commits into from
May 16, 2023
Merged

Conversation

CraftSpider
Copy link
Contributor

These test some simple error cases, I plan to rebase #1032 on this so there are more tests available to avoid regressions

@CraftSpider CraftSpider marked this pull request as ready for review May 15, 2023 14:21
@codecov
Copy link

codecov bot commented May 15, 2023

Codecov Report

Merging #1037 (a6b87ba) into master (0d9169e) will increase coverage by 0.06%.
The diff coverage is 76.19%.

❗ Current head a6b87ba differs from pull request most recent head 84ec77c. Consider uploading reports for the commit 84ec77c to get more accurate results

@@            Coverage Diff             @@
##           master    #1037      +/-   ##
==========================================
+ Coverage   44.79%   44.85%   +0.06%     
==========================================
  Files         155      155              
  Lines       62607    62585      -22     
==========================================
+ Hits        28043    28075      +32     
+ Misses      34564    34510      -54     
Impacted Files Coverage Δ
src/config.rs 60.52% <0.00%> (ø)
crates/engine_bibtex/bibtex/bibtex.c 44.75% <33.33%> (+1.40%) ⬆️
src/driver.rs 75.65% <100.00%> (+0.11%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@CraftSpider
Copy link
Contributor Author

Well, apparently, the existing code fails on Windows. It doesn't fail locally on Linux or Windows, which makes me think somehow the code is invoking UB, except I think it's UB in the C code, so no clue where it is yet. I'll spend some time trying to figure this out.

@CraftSpider
Copy link
Contributor Author

Ah, it's not UB, I realize what's wrong I think - \r and \n are considered separate newline characters on Windows, and I bet it's checking out with \r\n newlines - that would explain why the numbers are what they are, it's counting each line twice. I think I can fix that in input_ln

Copy link
Collaborator

@pkgw pkgw left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! I have a couple of requested changes that ought to be straightforward to implement, if you don't mind.

crates/engine_bibtex/bibtex/bibtex.c Outdated Show resolved Hide resolved
@pkgw
Copy link
Collaborator

pkgw commented May 16, 2023

Thanks! Looks like we had a spurious test failure here, I think that we should pass with a retry.

(The tectonic-on-arXiv test will just raise some failures incorrectly for a bit until we straighten out some reproducibility subtleties; see #1036)

@pkgw pkgw merged commit d03f3fe into tectonic-typesetting:master May 16, 2023
@CraftSpider CraftSpider deleted the bibtex-tests branch May 19, 2023 17:49
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.

2 participants