File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2630,6 +2630,30 @@ class A(Generic[T]):
26302630
26312631#[ test]
26322632fn match_before_py310 ( ) {
2633+ // ok on 3.10
2634+ assert_cmd_snapshot ! ( Command :: new( get_cargo_bin( BIN_NAME ) )
2635+ . args( STDIN_BASE_OPTIONS )
2636+ . args( [ "--stdin-filename" , "test.py" ] )
2637+ . arg( "--target-version=py310" )
2638+ . arg( "-" )
2639+ . pass_stdin(
2640+ r#"
2641+ match 2:
2642+ case 1:
2643+ print("it's one")
2644+ "#
2645+ ) ,
2646+ @r"
2647+ success: true
2648+ exit_code: 0
2649+ ----- stdout -----
2650+ All checks passed!
2651+
2652+ ----- stderr -----
2653+ "
2654+ ) ;
2655+
2656+ // syntax error on 3.9
26332657 assert_cmd_snapshot ! ( Command :: new( get_cargo_bin( BIN_NAME ) )
26342658 . args( STDIN_BASE_OPTIONS )
26352659 . args( [ "--stdin-filename" , "test.py" ] )
You can’t perform that action at this time.
0 commit comments