Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Testing illegal Unicode hosing things #126

Closed
cweb opened this issue May 7, 2015 · 2 comments
Closed

Testing illegal Unicode hosing things #126

cweb opened this issue May 7, 2015 · 2 comments

Comments

@cweb
Copy link

cweb commented May 7, 2015

I've been testing URLs and noticed that my tests containing illegal Unicode are hosing things, not sure where in the pipeline but it seems to be inside the assert_equals(). I've narrowed down the problem test case to this: http://testcases.org/test/unicode/buith.html

The second test case seems to be the problem, testing an illegal half-surrogate U+D800.

assert_equals(uni, uni2, "U+D800");

where:

var uni = '\uD800\u597d';
var uni2 = '\uFFFD\u597d';

Oddly, the test of 'uni' against itself doesn't hose things:

assert_equals(uni, uni, "U+D800");
@Ms2ger
Copy link
Contributor

Ms2ger commented May 7, 2015

The issue is with any failing assertion, actually, and is caused by the location of your testharness.js copy: under js rather than resources. This causes us to iloop here:

        var re = /\/resources\/testharness\.js/;
        var i = 0;
        // Fire remove any preamble that doesn't match the regexp
        while (!re.test(lines[i])) {
            i++
        }

@cweb
Copy link
Author

cweb commented May 8, 2015

Ah perfect, moving testharness.js to /resources solved it, thanks.

@cweb cweb closed this as completed May 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants