diff options
-rw-r--r-- | src/eval/test.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/eval/test.rs b/src/eval/test.rs index c9e7630..5fc385d 100644 --- a/src/eval/test.rs +++ b/src/eval/test.rs | |||
@@ -365,6 +365,26 @@ fn node_1() { | |||
365 | println(text(node)); | 365 | println(text(node)); |
366 | println(text(node.name)); | 366 | println(text(node.name)); |
367 | }"#, | 367 | }"#, |
368 | "def foo(a, b): hello()", | ||
369 | r#"enter function_definition { | ||
370 | node n = node; | ||
371 | println(text(parent(n))); | ||
372 | }"#, | ||
373 | expect![[r#" | ||
374 | def foo(a, b): hello() | ||
375 | "#]], | ||
376 | expect![], | ||
377 | ); | ||
378 | } | ||
379 | |||
380 | #[test] | ||
381 | fn node_1() { | ||
382 | gen_test( | ||
383 | "def foo(a, b): hello()", | ||
384 | r#"enter function_definition { | ||
385 | println(text(node)); | ||
386 | println(text(node.name)); | ||
387 | }"#, | ||
368 | expect![[r#" | 388 | expect![[r#" |
369 | def foo(a, b): hello() | 389 | def foo(a, b): hello() |
370 | foo | 390 | foo |