From 966fecef9cb7c8aadebb9649d139420a20ac0a29 Mon Sep 17 00:00:00 2001 From: lisonge Date: Tue, 31 Oct 2023 17:24:58 +0800 Subject: [PATCH] chore(selector): check_escape --- .../src/jvmTest/kotlin/li/songe/selector/ParserTest.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/selector/src/jvmTest/kotlin/li/songe/selector/ParserTest.kt b/selector/src/jvmTest/kotlin/li/songe/selector/ParserTest.kt index ab05720..e4c8ca0 100644 --- a/selector/src/jvmTest/kotlin/li/songe/selector/ParserTest.kt +++ b/selector/src/jvmTest/kotlin/li/songe/selector/ParserTest.kt @@ -112,4 +112,13 @@ class ParserTest { val selector = Selector.parse("a[a=''] ") println("check_quote:$selector") } + + @Test + fun check_escape() { + val source = + "[a='\\\"'][a=\"'\"][a=`\\x20\\n\\uD83D\\uDE04`][a=`\\x20`][a=\"`\u0020\"][a=`\\t\\n\\r\\b\\x00\\x09\\x1d`]" + println("source:$source") + val selector = Selector.parse(source) + println("check_quote:$selector") + } } \ No newline at end of file