@@ -61,3 +61,70 @@ fn issue_1282() {
61
61
#[ link_args = "-s NO_FILESYSTEM=1 -s NO_EXIT_RUNTIME=1 -s EXPORTED_RUNTIME_METHODS=[\" _malloc\" ] \
62
62
-s NO_DYNAMIC_EXECUTION=1 -s ELIMINATE_DUPLICATE_FUNCTIONS=1 -s EVAL_CTORS=1"]
63
63
extern "C" { }
64
+
65
+ // #4471 - strings including `\` should not wrap at the `\`
66
+ const ASCII_ESCAPE : & str =
67
+ "id\u{1f} 1\u{1f} /Users/nixon/dev/rs/gitstatusd\u{1f} 1c9be4fe5460a30e70de9cbf99c3ec7064296b28\
68
+ \u{1f} master\u{1f} \u{1f} \u{1f} \u{1f} \u{1f} 7\u{1f} 0\u{1f} 1\u{1f} 0\u{1f} 1\u{1f} 0\u{1f} 0\u{1f} 0\
69
+ \u{1f} \u{1f} 0\u{1f} 0\u{1f} 0\u{1f} \u{1f} \u{1f} 0\u{1f} 0\u{1f} 0\u{1f} 0";
70
+ const ASCII_ESCAPE : & str = "id\u{1f} 1\u{1f} /Users/nixon/dev/rs/gitstatusd\
71
+ \u{1f} 1c9be4fe5460a30e70de9cbf99c3ec7064296b28\u{1f} master\u{1f} \
72
+ \u{1f} \u{1f} \u{1f} \u{1f} 7\u{1f} 0";
73
+ const ASCII_ESCAPE : & str = "id\u{1f} 1\u{1f} /Users/nixon/dev/rs/gitstatusd\
74
+ \u{1f} 1c9be4fe5460a30e70de9cbf99c3ec70642,96b28\u{1f} master\u{1f} \
75
+ \u{1f} \u{1f} \u{1f} \u{1f} 7\u{1f} 0";
76
+ const ASCII_ESCAPE : & str = "id\u{1f} 1\u{1f} /Users/nixon/dev/rs/gitstatusd\
77
+ \u{1f} 1c9be4fe5460a30e70de9cbf99c3ec70642 \
78
+ 96b28\u{1f} master\u{1f} \u{1f} \u{1f} \u{1f} \u{1f} 7\u{1f} 0";
79
+
80
+ const ASCII_ESCAPL : & str = "\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \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678901234567890123456789012345678901234567890123456789;,:\
104
+ 0123456789012345678901234567890123456789012345678901234567890123456789";
105
+ const ASCII_ESCAPl : & str =
106
+ "0123456789012345678901234567890123456789012345678901234567890123456789;\
107
+ 0123456789012345678901234567890123456789012345678901234567890123456789";
108
+ const ASCII_ESCAP0 : & str =
109
+ "0123456789012345678901234567890123456789012345678901234567890123456;,:\
110
+ 7890123456789012345678901234567890123456789012345678901234567890123456789";
111
+
112
+ const ASCII : & str = "xxxxxxxxxxxxxxxxxxxxxxxxxx\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \
113
+ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ ";
114
+ const ASCII : & str =
115
+ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\ \
116
+ \n yyyyyyyyyyyy";
117
+
118
+ // #5138 - strings including `\` should not wrap at the `\`
119
+ fn raw ( ) {
120
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
121
+ \\ a";
122
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\ \
123
+ \\ a";
124
+ "a\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \
125
+ \\ ";
126
+ "\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \
127
+ \\ ";
128
+ "\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \
129
+ \\ \\ ";
130
+ }
0 commit comments