Files
pplus-library/mojo/probes/string-replace-escapes.mojo
T
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

7 lines
334 B
Mojo

# probe: does replace() on a String replace every occurrence, so a chain of them undoes percent escapes? (yes: %2520 becomes %20, not a space)
# expect-stdout: x y%20
# expect-stdout: z%
def main():
var s = String("x%20y%2520%0Az%25")
print(s.replace("%20", " ").replace("%0A", "\n").replace("%0D", "\r").replace("%25", "%"))