()
| 242 | |
| 243 | #[test] |
| 244 | fn test_basic_tokenize() { |
| 245 | let input = String::from( |
| 246 | "letter(upcase=True) | letter(upcase=False) | glob(rest=True) | glob(rest=False) | whitespace | number", |
| 247 | ); |
| 248 | |
| 249 | assert_eq!( |
| 250 | parse(tokens::tokenize(input)), |
| 251 | vec![ |
| 252 | Function::Letter { |
| 253 | casing: Some(Casing::Upcase), |
| 254 | select: None, |
| 255 | }, |
| 256 | Function::Letter { |
| 257 | casing: Some(Casing::Downcase), |
| 258 | select: None |
| 259 | }, |
| 260 | Function::Glob { rest: true }, |
| 261 | Function::Glob { rest: false }, |
| 262 | Function::Whitespace, |
| 263 | Function::Number { select: None }, |
| 264 | ] |
| 265 | ); |
| 266 | |
| 267 | let input = String::from("letters(upcase=True) | glob(rest=True) | whitespace | numbers"); |
| 268 | |
| 269 | assert_eq!( |
| 270 | parse(tokens::tokenize(input)), |
| 271 | vec![ |
| 272 | Function::Letters { |
| 273 | casing: Some(Casing::Upcase), |
| 274 | }, |
| 275 | Function::Glob { rest: true }, |
| 276 | Function::Whitespace, |
| 277 | Function::Numbers, |
| 278 | ] |
| 279 | ); |
| 280 | } |
| 281 | |
| 282 | #[test] |
| 283 | fn test_select_parameters() { |
nothing calls this directly
no outgoing calls
no test coverage detected