-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Fix CMap unit tests #5185
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
Fix CMap unit tests #5185
Conversation
When the binary CMaps were added, some of the relevant unit tests were not changed. This patch updates them, so that we actually test the current implementation. What's somewhat troubling here is that we currently have CMap unit tests that passes, *despite* not working as intended (the CMap files doesn't load).
/botio unittest |
From: Bot.io (Linux)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/376f0b4cc9e4f38/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/6a1baadc4f3441c/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/376f0b4cc9e4f38/output.txt Total script time: 0.64 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/6a1baadc4f3441c/output.txt Total script time: 0.70 mins
|
It's a good idea. New PR will be okay for that. |
Thank you |
When the binary CMaps were added, some of the relevant unit tests were not changed. This patch updates them, so that we actually test the current implementation.
What's somewhat troubling here is that we currently have CMap unit tests that passes, despite not working as intended (the CMap files doesn't load).
Edit: When failing to
GET
a CMap we shoulderror
, see cmap.js#L390-L392 and cmap.js#L930-L932, but the condition isn't true, even when the CMap fails to load.I found a review comment for PR #4259 that was never addressed, which (in my testing) would fix the current situation where we fail to throw an error when the CMap is unavailable.
@yurydelendik If you think it's a good idea, I'd be happy to follow-up this PR with that fix!
In this PR I'm also removing the remaining references to cidmaps.js, which I missed in #5088.