using Unicode, Test function palindromo(string) normalized_str = Unicode.normalize(string, casefold=true, stripmark=true, stripignore=true) clean_str = replace(normalized_str, r"[^0-9a-zA-Z]+" => "") return reverse(clean_str) == clean_str end # Seção de testes function extra_test() @testset "Tests for MiniEP11" begin @testset "palindromo" begin @test palindromo("") @test palindromo("a") @test palindromo("ovo") @test palindromo("radar") @test palindromo("O céu sueco.") @test palindromo("A mãe te ama.") @test palindromo("Socorram-me, subi no ônibus em Marrocos!") @test !palindromo("abc") @test !palindromo("Teste") @test !palindromo("MiniEP11") @test !palindromo("Passei em MAC0110!") @test !palindromo("Memes, tipos de carinhas são.") end end end