package com.peachpasswords.shared import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Test class DomainUtilsTest { @Test fun detect_homograph_flags_unicode_hosts() { assertTrue(detectHomograph("https://аpple.com")) } @Test fun detect_homograph_flags_punycode_hosts() { assertTrue(detectHomograph("https://xn--pple-43d.com")) assertTrue(detectHomograph("xn--pple-43d.com")) } @Test fun detect_homograph_ignores_plain_ascii_and_invalid_urls() { assertFalse(detectHomograph("https://apple.com")) assertFalse(detectHomograph("")) assertFalse(detectHomograph("http://")) } }