MCPcopy Create free account
hub / github.com/PRQL/prql / test_basic_string

Function test_basic_string

prqlc/prqlc-parser/src/lexer/test.rs:131–138  ·  view source on GitHub ↗
(input: &str, escaped: bool, expected_str: &str)

Source from the content-addressed store, hash-verified

129#[test]
130fn quotes() {
131 fn test_basic_string(input: &str, escaped: bool, expected_str: &str) {
132 let parse_result = quoted_string(escaped).parse(input);
133 if let Some(result) = parse_result.output() {
134 assert_eq!(result, expected_str);
135 } else {
136 panic!("Failed to parse string: {:?}", input);
137 }
138 }
139
140 test_basic_string(r#"'aoeu'"#, false, "aoeu");
141 test_basic_string(r#"''"#, true, "");

Callers 1

quotesFunction · 0.85

Calls 1

quoted_stringFunction · 0.85

Tested by

no test coverage detected