You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[case("foo bar baz",0,3,EditCommand::LowercaseSelection,"foo bar baz")]
1965
+
#[case("Foo Bar Baz",0,7,EditCommand::LowercaseSelection,"foo bar Baz")]
1966
+
#[case("FOO BAR BAZ",0,12,EditCommand::LowercaseSelection,"foo bar baz")]
1967
+
#[case("foo bar baz",0,3,EditCommand::UppercaseSelection,"FOO bar baz")]
1968
+
#[case("Foo Bar Baz",0,7,EditCommand::UppercaseSelection,"FOO BAR Baz")]
1969
+
#[case("FOO BAR BAZ",0,12,EditCommand::UppercaseSelection,"FOO BAR BAZ")]
1970
+
#[case("foo bar baz",0,3,EditCommand::SwitchcaseSelection,"FOO bar baz")]
1971
+
#[case("Foo Bar Baz",0,7,EditCommand::SwitchcaseSelection,"fOO bAR Baz")]
1972
+
#[case("FOO BAR BAZ",0,12,EditCommand::SwitchcaseSelection,"foo bar baz")]
1973
+
fntest_lower_upper_switchcase_selection(
1974
+
#[case]input:&str,
1975
+
#[case]selection_start:usize,
1976
+
#[case]selection_end:usize,
1977
+
#[case]command:EditCommand,
1978
+
#[case]expected_buffer:&str,
1979
+
){
1980
+
letmut editor = editor_with(input);
1981
+
editor.move_to_position(selection_start,false);
1982
+
editor.move_to_position(selection_end,true);
1983
+
editor.run_edit_command(&command);
1984
+
assert_eq!(editor.get_buffer(), expected_buffer);
1985
+
}
1986
+
1929
1987
#[rstest]
1930
1988
#[case("hello-world test",2,TextObject{ scope:TextObjectScope::Inner, object_type:TextObjectType::Word},"-world test","hello")]// small word gets just "hello"
1931
1989
#[case("hello-world test",2,TextObject{ scope:TextObjectScope::Inner, object_type:TextObjectType::BigWord}," test","hello-world")]// big word gets "hello-word"
0 commit comments