()
| 2253 | |
| 2254 | #[test] |
| 2255 | fn test_builtin_calls() { |
| 2256 | do_ok_test( |
| 2257 | "PRINT a\nPRINT ; 3 , c$\nNOARGS\nNAME 3 AS 4", |
| 2258 | &[ |
| 2259 | Statement::Call(CallSpan { |
| 2260 | vref: VarRef::new("PRINT", None), |
| 2261 | vref_pos: lc(1, 1), |
| 2262 | args: vec![ArgSpan { |
| 2263 | expr: Some(expr_symbol(VarRef::new("a", None), 1, 7)), |
| 2264 | sep: ArgSep::End, |
| 2265 | sep_pos: lc(1, 8), |
| 2266 | }], |
| 2267 | }), |
| 2268 | Statement::Call(CallSpan { |
| 2269 | vref: VarRef::new("PRINT", None), |
| 2270 | vref_pos: lc(2, 1), |
| 2271 | args: vec![ |
| 2272 | ArgSpan { expr: None, sep: ArgSep::Short, sep_pos: lc(2, 7) }, |
| 2273 | ArgSpan { |
| 2274 | expr: Some(expr_integer(3, 2, 9)), |
| 2275 | sep: ArgSep::Long, |
| 2276 | sep_pos: lc(2, 11), |
| 2277 | }, |
| 2278 | ArgSpan { |
| 2279 | expr: Some(expr_symbol(VarRef::new("c", Some(ExprType::Text)), 2, 13)), |
| 2280 | sep: ArgSep::End, |
| 2281 | sep_pos: lc(2, 15), |
| 2282 | }, |
| 2283 | ], |
| 2284 | }), |
| 2285 | Statement::Call(CallSpan { |
| 2286 | vref: VarRef::new("NOARGS", None), |
| 2287 | vref_pos: lc(3, 1), |
| 2288 | args: vec![], |
| 2289 | }), |
| 2290 | Statement::Call(CallSpan { |
| 2291 | vref: VarRef::new("NAME", None), |
| 2292 | vref_pos: lc(4, 1), |
| 2293 | args: vec![ |
| 2294 | ArgSpan { |
| 2295 | expr: Some(expr_integer(3, 4, 6)), |
| 2296 | sep: ArgSep::As, |
| 2297 | sep_pos: lc(4, 8), |
| 2298 | }, |
| 2299 | ArgSpan { |
| 2300 | expr: Some(expr_integer(4, 4, 11)), |
| 2301 | sep: ArgSep::End, |
| 2302 | sep_pos: lc(4, 12), |
| 2303 | }, |
| 2304 | ], |
| 2305 | }), |
| 2306 | ], |
| 2307 | ); |
| 2308 | } |
| 2309 | |
| 2310 | #[test] |
| 2311 | fn test_builtin_calls_and_array_references_disambiguation() { |
nothing calls this directly
no test coverage detected