Closes #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index bb4559c..a7a3e4a 100644
--- a/Lib/test/test_posixpath.py
+++ b/Lib/test/test_posixpath.py
@@ -298,6 +298,7 @@
             with support.EnvironmentVarGuard() as env:
                 env['HOME'] = '/'
                 self.assertEqual(posixpath.expanduser("~"), "/")
+                self.assertEqual(posixpath.expanduser("~/foo"), "/foo")
                 # expanduser should fall back to using the password database
                 del env['HOME']
                 home = pwd.getpwuid(os.getuid()).pw_dir