+@wvtest
+def test_shstr():
+ with no_lingering_errors():
+ # Do nothing for strings and bytes
+ WVPASSEQ(shstr(b''), b'')
+ WVPASSEQ(shstr(b'1'), b'1')
+ WVPASSEQ(shstr(b'1 2'), b'1 2')
+ WVPASSEQ(shstr(b"1'2"), b"1'2")
+ WVPASSEQ(shstr(''), '')
+ WVPASSEQ(shstr('1'), '1')
+ WVPASSEQ(shstr('1 2'), '1 2')
+ WVPASSEQ(shstr("1'2"), "1'2")
+
+ # Escape parts of sequences
+ WVPASSEQ(shstr((b'1 2', b'3')), b"'1 2' 3")
+ WVPASSEQ(shstr((b"1'2", b'3')), b"'1'\"'\"'2' 3")
+ WVPASSEQ(shstr((b"'1", b'3')), b"''\"'\"'1' 3")
+ WVPASSEQ(shstr(('1 2', '3')), "'1 2' 3")
+ WVPASSEQ(shstr(("1'2", '3')), "'1'\"'\"'2' 3")
+ WVPASSEQ(shstr(("'1", '3')), "''\"'\"'1' 3")
+
+