I discovered by chance this story of a woman (Mabel Freer) who was refused admission to Australia in 1936 twice , because she twice failed a test set by an immigration officer. The test was a dictation in Italian—a language she didn’t know.
Australian law at the time allowed the immigration authorities to set a dictation test in any European language. This made it easy for the authorities to exclude people they considered undesirable, often because the aspiring immigrants weren’t white.
The woman had been living in India. After the breakdown of her own marriage, she had an affair with a married Australian man, and wanted to live with him in Australia. It seems the authorities objected because they considered her immoral. Mabel did ultimately get into Australia and settled there, though her relationship with the Australian man did not last. Meanwhile, the case almost caused the collapse of the coalition government in Australia. Mabel Freer – Wikipedia
Apparently, another well known case was of a multilingual Czech journalist (Egon Kisch), who was set the test in Scots Gaelic https://research-management.mq.edu.au/ws/portalfiles/portal/16987616/mq-1211-Publisher%20version%20(open%20access).pdf
Dictation is the best test of language competence
As I have written before, I agree with one of my school German teachers (Bob Tyler) that dictation is the best all round test of someone’s language knowledge. https://languagemiscellany.com/2021/10/dictation-in-language-learning/