diff options
Diffstat (limited to 'tests/dialects/test_trino.py')
-rw-r--r-- | tests/dialects/test_trino.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/dialects/test_trino.py b/tests/dialects/test_trino.py new file mode 100644 index 0000000..ccc1407 --- /dev/null +++ b/tests/dialects/test_trino.py @@ -0,0 +1,18 @@ +from tests.dialects.test_dialect import Validator + + +class TestTrino(Validator): + dialect = "trino" + + def test_trim(self): + self.validate_identity("SELECT TRIM('!' FROM '!foo!')") + self.validate_identity("SELECT TRIM(BOTH '$' FROM '$var$')") + self.validate_identity("SELECT TRIM(TRAILING 'ER' FROM UPPER('worker'))") + self.validate_identity( + "SELECT TRIM(LEADING FROM ' abcd')", + "SELECT LTRIM(' abcd')", + ) + self.validate_identity( + "SELECT TRIM('!foo!', '!')", + "SELECT TRIM('!' FROM '!foo!')", + ) |