Commit c4cbd61
committed
Added tests for
As gracjan requested in #603, I
> * add[ed] a test case for haskell-ident-at-point really returning nil when it should
> * add[ed] a test case for haskell-ident-pos-at-point returning non-nil
> * add[ed] a test case for haskell-ident-pos-at-point returning nil
> * add[ed] a test case for haskell-spanable-pos-at-point returning non-nil
> * add[ed] a test case for haskell-spanable-pos-at-point returning nil
I added some somewhat detailed `nil`-checking, a couple quick tests for
`haskell-{ident,spanable}-pos-at-point` that just try the same unicode
identifiers, and then some tests to distinguish
`haskell-spanable-pos-at-point` by using an identifier in backticks.
Any test for `haskell-ident-at-point` could also be a test for the other
two, so that's a potential source of more tests; however, the
definitions of the functions in terms of `haskell-ident-pos-at-point`
are so simple that this didn't seem to add much (especially given the
sheer amount of test duplication).haskell-ident-at-point & friends1 parent 6a3257c commit c4cbd61
1 file changed
+92
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
28 | 71 | | |
29 | 72 | | |
30 | 73 | | |
| |||
127 | 170 | | |
128 | 171 | | |
129 | 172 | | |
130 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
131 | 222 | | |
132 | 223 | | |
133 | 224 | | |
| |||
0 commit comments