"Squeky Clean" might have a poorly defined test case

This test seems to expect a string without a control character to return a result with a control character signifier in it. Is this a mistake in the test case?

The control character is \u0000, but browsers typically won’t render such characters. So we can’t see them.

1 Like

Yes! Figured right after, but can’t for some reason delete the post anymore :joy:

I’d argue this is a bug in the test infrastructure. Should it not show escape codes?

I checked and that character is missing from the displayed string “myId”. It exists when the exercise is downloaded but dev tools show that it’s not even there. I’m not sure if it’s a bug or intentional.

@ErikSchierboom any idea why this happens?

Not really. Could happen in a number of places. I’ll put it on the list.

Update:

The control char in the instructions was invalid (\0 instead of \u0000). It has been replaced by \u007F and it renders correctly as \u007F. So instructions are not affected by this issue.

The control char in the tests was valid (\u0000) but we decided to replace it with \u0080. The text\u0000 didn’t even show up at all. The text\u0080 does not show up too, but now Chrome shows € instead.

So it looks as if the control characters are being parsed and displayed as the corresponding char and that’s exactly what we don’t want. We want a unicode escape sequence like \u0000 to be interpreted as text.

1 Like