File tree 1 file changed +27
-10
lines changed
1 file changed +27
-10
lines changed Original file line number Diff line number Diff line change 67
67
(cons " \\ n" " \n " )
68
68
(cons " \\ '" " '" )
69
69
(cons " \\ \" " " \" " )
70
- (cons " \\ SOH" " \x 01" )))
70
+ (cons " \\ SOH" " \x 01" )
71
+ (cons " \\ 1114111" " \x 10ffff" )
72
+ (cons " \\ o4177777" " \x 10ffff" )
73
+ (cons " \\ x10ffff" " \x 10ffff" )
74
+ (cons " \\ ^@" " \x 00" )
75
+ (cons " \\ ^A" " \x 01" )
76
+ (cons " \\ ^Z" " \x 1A" )
77
+ (cons " \\ ^[" " \x 1B" )
78
+ (cons " \\ ^\\ " " \x 1C" )
79
+ (cons " \\ ^]" " \x 1D" )
80
+ (cons " \\ ^^" " \x 1E" )
81
+ (cons " \\ ^_" " \x 1F" )))
71
82
(should (string= (cdr cs)
72
83
(haskell-string-literal-decode (concat " \" " (car cs) " \" " ))))
73
84
(should (string= (cdr cs)
87
98
" \x 01" ; ; '\SOH'
88
99
" \x 00df\x 30" ; ; '\223' '0'
89
100
" '"
90
- " \' "
101
+ " \' "
91
102
" \" "
92
103
" \x 0e&H"
93
104
" \\ "
94
105
" \\ \\ "
95
106
" \\\\ \" "
96
- (string 40 945 8322 946 8323 8743 947 178 949 178 41 )
97
- " x"
98
- " xy"
99
- " \\ x123"
100
- " \\ \\ x123"
101
- " "
102
- " "
103
- " " ))
107
+ (string 40 945 8322 946 8323 8743 947 178 949 178 41 )
108
+ " x"
109
+ " xy"
110
+ " \\ x123"
111
+ " \\ \\ x123"
112
+ " "
113
+ " "
114
+ " " )) ;
104
115
(should (string= s0 (haskell-string-literal-decode (haskell-string-literal-encode s0))))
105
116
(should (string= s0 (haskell-string-literal-decode (haskell-string-literal-encode s0 t ) t ))))
106
117
112
123
(s2 (haskell-string-literal-decode (haskell-string-literal-encode s0 t ) t )))
113
124
(should (string= s0 s1))
114
125
(should (string= s0 s2))))))
126
+
127
+ (ert-deftest haskell-string-test-trim ()
128
+ (should (equal " saf \t sdsaf"
129
+ (haskell-string-trim " \r\n saf \t sdsaf \t\v\n \f " )))
130
+ (should (haskell-string-only-spaces-p " \r\n \t \t\v\n \f " ))
131
+ (should-not (haskell-string-only-spaces-p " \r\n \t x \t\v\n \f " )))
You can’t perform that action at this time.
0 commit comments