When transmitting values up to the tester API, we distinguish multiple values with pipes. Unfortunately, this means that any Implementation or Tester that uses a pipe character anywhere within its body (e.g. in a comment, but critically in
bitwise operations) gets munged half-way through, triggering an invalid-object error.
Steps to replicate the issue (include links if applicable):
- Go to any Implementation with connected tests in Python or JavaScript. (For example, https://www.wikifunctions.org/view/en/Z13091)
- Click “Edit source”.
- Enter a pipe character [“|” – U+007C] anywhere in the code or within a comment.
- Click the refresh icon in the Tests box.
What happens?:
- All Tests show as failed.
- No Test has details of the execution or failure, when “Details” is clicked.
- Only the Implementation label and the Test label appear in the pop-up.
Trying the same inputs in “Try this implementation” is successful, however.
What should have happened instead?:
Tests should still have passed or, if they fail, details of the execution and error should be viewable on clicking “Details”.
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
The same problem can occur in a composition that contains a literal string (like: https://www.wikifunctions.org/wiki/Z13264).
Insert a “|” within the Z6 value (labelled “suffix” in the example provided) and click the refresh icon in the Tests box. All tests fail without details.
After removing the “|”, Tests will pass or fail as expected after clicking the refresh icon.
Initial view with successful tests at 22:16.“Edit source” with no changes at 22:17.
No execution details in the pop-up
Subsequent view at 22:18, after cancelling the edit.
A previous example showing a successful result for the inputs to a “failed” Test.
The pipe character also breaks a Z20/Test if it is used within the value of a Z6/String while editing the Test.