mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
testing path with non-latin characters in it (see http://padre.perlide.org/ticket/218 )
This commit is contained in:
parent
a2fdf8c3f9
commit
cc19fceb69
1 changed files with 33 additions and 0 deletions
33
t/33_non_latin_path.t
Normal file
33
t/33_non_latin_path.t
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Tests path containing non-latine-1 characters
|
||||
# currently fails on Windows
|
||||
|
||||
use strict;
|
||||
BEGIN {
|
||||
$| = 1;
|
||||
$^W = 1;
|
||||
}
|
||||
use utf8;
|
||||
|
||||
use t::lib::Test;
|
||||
use Test::More;
|
||||
use Test::NoWarnings;
|
||||
use File::Temp qw(tempdir);
|
||||
use File::Spec::Functions qw(catdir catfile);
|
||||
|
||||
my @subdirs = ('database', 'adatbázis');
|
||||
plan tests => 1 + @subdirs * 2;
|
||||
|
||||
my $dir = tempdir( CLEANUP => 1 );
|
||||
|
||||
foreach my $subdir (@subdirs) {
|
||||
ok(mkdir(catdir($dir, $subdir)), "$subdir created");
|
||||
my $dbfile = catfile($dir, $subdir, 'db.db');
|
||||
eval {
|
||||
DBI->connect("dbi:SQLite:dbname=$dbfile");
|
||||
};
|
||||
ok(!$@, "Could connect to database in $subdir") or diag $@;
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue