Add test
The rename function should not change any path segments that refer to a
module by super.
@@ -1108,6 +1108,31 @@ pub mod foo$0;
);
}
+ #[test]
+ fn test_rename_mod_ref_by_super() {
+ check(
+ "baz",
+ r#"
+ mod $0foo {
+ struct X;
+
+ mod bar {
+ use super::X;
+ }
+ }
+ "#,
+ r#"
+ mod baz {
+ struct X;
+
+ mod bar {
+ use super::X;
+ }
+ }
+ "#,
+ )
+ }
+
#[test]
fn test_enum_variant_from_module_1() {
cov_mark::check!(rename_non_local);
