[parts] `public_member_api_docs` test

Fixes: https://github.com/dart-lang/linter/issues/5090

Change-Id: I827fa92bfb11a2f8868f7e8268a3432f0af2faee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
diff --git a/pkg/linter/test/rules/public_member_api_docs_test.dart b/pkg/linter/test/rules/public_member_api_docs_test.dart
index 975b15c..0b0b4b9 100644
--- a/pkg/linter/test/rules/public_member_api_docs_test.dart
+++ b/pkg/linter/test/rules/public_member_api_docs_test.dart
@@ -324,6 +324,20 @@
 }''');
   }
 
+  test_partFile() async {
+    newFile('$testPackageRootPath/test/a.dart', r'''
+part 'test.dart';
+''');
+
+    await assertDiagnostics(r'''
+part of 'a.dart';
+
+class A { }
+''', [
+      lint(25, 1),
+    ]);
+  }
+
   /// https://github.com/dart-lang/linter/issues/4526
   test_sealedConstructor() async {
     await assertDiagnostics(r'''