From 2ee53826894bc4d3cf608e8b0f47d4004176ec79 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Sat, 15 Feb 2025 13:25:49 +0400 Subject: [PATCH] add substr cases in TCL tests --- testing/scalar-functions.test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/testing/scalar-functions.test b/testing/scalar-functions.test index 47cca09d4..2ba0d58a4 100755 --- a/testing/scalar-functions.test +++ b/testing/scalar-functions.test @@ -535,6 +535,21 @@ do_execsql_test substr-2-args { SELECT substr('limbo', 3); } {mbo} +do_execsql_test substr-cases { + SELECT substr('limbo', 0); + SELECT substr('limbo', 0, 3); + SELECT substr('limbo', -2); + SELECT substr('limbo', -2, 1); + SELECT substr('limbo', -10, 7); + SELECT substr('limbo', 10, -7); +} {limbo +li +bo +b +li +mbo +} + do_execsql_test substring-3-args { SELECT substring('limbo', 1, 3); } {lim}