@@ -61,6 +61,28 @@ def test_service_type_name_non_strict_compliant_names(instance_name, service_typ
6161 assert instance_name_from_service_info (info , strict = False ) == instance_name
6262
6363
64+ @pytest .mark .parametrize (
65+ "type_, expected" ,
66+ (
67+ ("_http._tcp.LOCAL." , "_http._tcp.LOCAL." ),
68+ ("_http._TCP.local." , "_http._TCP.local." ),
69+ ("_HTTP._tcp.local." , "_HTTP._tcp.local." ),
70+ ("Instance._http._tcp.LOCAL." , "_http._tcp.LOCAL." ),
71+ ("_ntp._udp.LOCAL." , "_ntp._udp.LOCAL." ),
72+ ("_ntp._UDP.local." , "_ntp._UDP.local." ),
73+ ("Instance._ntp._udp.LOCAL." , "_ntp._udp.LOCAL." ),
74+ ),
75+ )
76+ def test_service_type_name_uppercase_trailer (type_ , expected ):
77+ """RFC 1035 §2.3.3 / RFC 6762 §16 — DNS names are case-insensitive."""
78+ assert nameutils .service_type_name (type_ ) == expected
79+
80+
81+ def test_service_type_name_uppercase_local_non_strict ():
82+ """Non-strict mode accepts uppercase .LOCAL. trailer without a protocol label."""
83+ assert nameutils .service_type_name ("Localhost.LOCAL." , strict = False ) == "LOCAL."
84+
85+
6486def test_possible_types ():
6587 """Test possible types from name."""
6688 assert nameutils .possible_types ("." ) == set ()
0 commit comments