Which standard was that? I thought only example.com was special-cased?
It wasn't formalized, but that doesn't really matter. It was well known and commonly done.
In fact, it couldn't have been formalized, because the TLDs were limited and by definition any non standard TLD was for internal use only. It would make no sense to have a defined standard for an impossible situation.
No, there never was any guarantee that the existing TLDs were all that would exist ever, so non-standard TLDs were just that: non-standard, undefined what happens to them. And you even provided a counter-example: .test is explicitly reserved by an internet standard to never be in public DNS and thus safe to use for testing purposes.
Pow used .dev and .test in the 2000s-2010s