Skip to content

Handle ranges that "overflow" the last byte in CMap.mapBfRange (bug 1627427) #14180

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

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

@calixteman
Copy link
Contributor

Maybe you could just add a test similar to:

it("gets text content, with no extra spaces (issue 13226)", async function () {

@Snuffleupagus
Copy link
Collaborator Author

Snuffleupagus commented Oct 24, 2021

Maybe you could just add a test similar to:

Sure, I've added a unit-test as well.
However I don't want to remove the text-test since in my experience it can be very tempting to just change the expected value in a unit-test, and thus accidentally accept a regression, compared to overlooking a ref-test failure.

@timvandermeij
Copy link
Contributor

/botio test

@mozilla mozilla deleted a comment from pdfjsbot Oct 24, 2021
@mozilla mozilla deleted a comment from pdfjsbot Oct 24, 2021
@mozilla mozilla deleted a comment from pdfjsbot Oct 24, 2021
@mozilla mozilla deleted a comment from pdfjsbot Oct 24, 2021
@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.241.84.105:8877/56e086c9916fdeb/output.txt

@mozilla mozilla deleted a comment from pdfjsbot Oct 24, 2021
@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/56e086c9916fdeb/output.txt

Total script time: 4.55 mins

Published

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/ca8b915d2dc9e11/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.193.163.58:8877/bf3473665023f8a/output.txt

const text = mergeText(items);

expect(text).toEqual(
"침하게 흐린 품이 눈이 올 듯하더니 눈은 아니 오고 얼다가 만 비가 추"
Copy link
Contributor

Choose a reason for hiding this comment

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

I get the exact same string in Acrobat.
I don't have the skills to evaluate the patch itself but at least it works.

@mozilla mozilla deleted a comment from pdfjsbot Oct 24, 2021
@calixteman
Copy link
Contributor

calixteman commented Oct 24, 2021

Maybe you could just add a test similar to:

Sure, I've added a unit-test as well. However I don't want to remove the text-test since in my experience it can be very tempting to just change the expected value in a unit-test, and thus accidentally accept a regression, compared to overlooking a ref-test failure.

I agree with you and at the same I'm not sure to be able to detect a visual regression with a glyph in a language I don't know at all.
So I speak for me only, but I think having 2 different ways to test that stuff is a good idea.

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/ca8b915d2dc9e11/output.txt

Total script time: 22.95 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 7
  different first/second rendering: 3

Image differences available at: http://54.241.84.105:8877/ca8b915d2dc9e11/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/bf3473665023f8a/output.txt

Total script time: 41.20 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 13
  different first/second rendering: 3

Image differences available at: http://54.193.163.58:8877/bf3473665023f8a/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit 0e7614d into mozilla:master Oct 27, 2021
@timvandermeij
Copy link
Contributor

Thank you for fixing this!

@Snuffleupagus Snuffleupagus deleted the bug-1627427 branch October 27, 2021 19:30
@Snuffleupagus Snuffleupagus restored the bug-1627427 branch October 27, 2021 19:30
@Snuffleupagus
Copy link
Collaborator Author

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/34e362e5917a993/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_makeref from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/9fa7e5c5bbc5bc3/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/34e362e5917a993/output.txt

Total script time: 20.69 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/9fa7e5c5bbc5bc3/output.txt

Total script time: 38.87 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@Snuffleupagus Snuffleupagus deleted the bug-1627427 branch October 27, 2021 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants