diff options
author | Toine Siebelink <toine.siebelink@est.tech> | 2023-07-20 13:27:18 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2023-07-20 13:27:18 +0000 |
commit | 0ba8fbf7aa8d30faad72ca20bfab142bdc1816da (patch) | |
tree | af4318ff4c7be1e2ebb81f1e774299578fdd31b3 /cps-ri/src/test | |
parent | 00113a7e3a3c9ad7ea44258097d82431320f7605 (diff) | |
parent | 74a47154f3bce495d9f58a300a860d750ae309f1 (diff) |
Merge "Apostrophe handling in CpsPathParser"
Diffstat (limited to 'cps-ri/src/test')
-rw-r--r-- | cps-ri/src/test/groovy/org/onap/cps/spi/utils/EscapeUtilsSpec.groovy | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/utils/EscapeUtilsSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/utils/EscapeUtilsSpec.groovy index 7de9b97ba0..52330e6251 100644 --- a/cps-ri/src/test/groovy/org/onap/cps/spi/utils/EscapeUtilsSpec.groovy +++ b/cps-ri/src/test/groovy/org/onap/cps/spi/utils/EscapeUtilsSpec.groovy @@ -24,7 +24,7 @@ import spock.lang.Specification class EscapeUtilsSpec extends Specification { - def 'Escape text for using in SQL LIKE operation'() { + def 'Escape text for use in SQL LIKE operation.'() { expect: 'SQL LIKE special characters to be escaped with forward-slash' assert EscapeUtils.escapeForSqlLike(unescapedText) == escapedText where: @@ -33,4 +33,9 @@ class EscapeUtilsSpec extends Specification { 'Others (./?$) are not special' || 'Others (./?$) are not special' } + def 'Escape text for use in SQL string literal.'() { + expect: 'single quotes to be doubled' + assert EscapeUtils.escapeForSqlStringLiteral("I'm escaping!") == "I''m escaping!" + } + } |