MCPcopy Create free account
hub / github.com/cherryramatisdev/regexer / test_select_parameters

Function test_select_parameters

regexer/src/lexer/ast.rs:283–304  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281
282 #[test]
283 fn test_select_parameters() {
284 let input = String::from(
285 "letter(select=3, upcase=True) | letters(upcase=False) | glob(rest=True) | glob(rest=False) | whitespace | number(select=99)",
286 );
287
288 assert_eq!(
289 parse(tokens::tokenize(input)),
290 vec![
291 Function::Letter {
292 casing: Some(Casing::Upcase),
293 select: Some(3),
294 },
295 Function::Letters {
296 casing: Some(Casing::Downcase),
297 },
298 Function::Glob { rest: true },
299 Function::Glob { rest: false },
300 Function::Whitespace,
301 Function::Number { select: Some(99) },
302 ]
303 );
304 }
305}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected