mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
added a test for strlike
This commit is contained in:
parent
bc3fb9500d
commit
0d52eae83d
1 changed files with 30 additions and 0 deletions
30
t/61_strlike.t
Normal file
30
t/61_strlike.t
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
BEGIN {
|
||||
$| = 1;
|
||||
$^W = 1;
|
||||
}
|
||||
|
||||
use t::lib::Test qw/requires_sqlite/;
|
||||
use Test::More;
|
||||
use DBD::SQLite;
|
||||
|
||||
BEGIN { requires_sqlite('3.10.0'); }
|
||||
|
||||
use Test::NoWarnings;
|
||||
|
||||
plan tests => 13;
|
||||
|
||||
ok !DBD::SQLite::strlike("foo_bar", "FOO1BAR");
|
||||
ok !DBD::SQLite::strlike("foo_bar", "FOO_BAR");
|
||||
ok DBD::SQLite::strlike("foo\\_bar", "FOO1BAR", "\\");
|
||||
ok !DBD::SQLite::strlike("foo\\_bar", "FOO_BAR", "\\");
|
||||
ok DBD::SQLite::strlike("foo!_bar", "FOO1BAR", "!");
|
||||
ok !DBD::SQLite::strlike("foo!_bar", "FOO_BAR", "!");
|
||||
ok !DBD::SQLite::strlike("%foobar", "1FOOBAR");
|
||||
ok !DBD::SQLite::strlike("%foobar", "%FOOBAR");
|
||||
ok DBD::SQLite::strlike("\\%foobar", "1FOOBAR", "\\");
|
||||
ok !DBD::SQLite::strlike("\\%foobar", "%FOOBAR", "\\");
|
||||
ok DBD::SQLite::strlike("!%foobar", "1FOOBAR", "!");
|
||||
ok !DBD::SQLite::strlike("!%foobar", "%FOOBAR", "!");
|
Loading…
Add table
Reference in a new issue