File tree Expand file tree Collapse file tree 1 file changed +27
-10
lines changed Expand file tree Collapse file tree 1 file changed +27
-10
lines changed Original file line number Diff line number Diff line change 6767 (cons " \\ n" " \n " )
6868 (cons " \\ '" " '" )
6969 (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" )))
7182 (should (string= (cdr cs)
7283 (haskell-string-literal-decode (concat " \" " (car cs) " \" " ))))
7384 (should (string= (cdr cs)
8798 " \x 01" ; ; '\SOH'
8899 " \x 00df\x 30" ; ; '\223' '0'
89100 " '"
90- " \' "
101+ " \' "
91102 " \" "
92103 " \x 0e&H"
93104 " \\ "
94105 " \\ \\ "
95106 " \\\\ \" "
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+ " " )) ;
104115 (should (string= s0 (haskell-string-literal-decode (haskell-string-literal-encode s0))))
105116 (should (string= s0 (haskell-string-literal-decode (haskell-string-literal-encode s0 t ) t ))))
106117
112123 (s2 (haskell-string-literal-decode (haskell-string-literal-encode s0 t ) t )))
113124 (should (string= s0 s1))
114125 (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