Subject: | [PATCH] Skip Unicode path tests under Cygwin |
Cygwin does not support Unicode chars in paths. Attached is the test
output showing this.
Therefore, some tests in t/33_non_latin_path.t need to be skipped. The
attached patch does this. (However, there may be a more elegant way of
doing this. I leave it to your discretion to improve on this.)
Subject: | DBD-SQLite.patch |
--- DBD-SQLite-1.23/t/33_non_latin_path.t.orig 2009-04-20 16:55:55.419584000 -0400
+++ DBD-SQLite-1.23/t/33_non_latin_path.t 2009-04-20 17:01:19.551635600 -0400
@@ -13,7 +13,7 @@
use Test::More;
BEGIN {
if ( $] >= 5.008005 ) {
- plan( tests => 25 );
+ plan( tests => (($^O eq 'cygwin') ? 13 : 25) );
} else {
plan( skip_all => 'Unicode is not supported before 5.8.5' );
}
@@ -30,6 +30,9 @@
my $dir = File::Temp::tempdir( CLEANUP => 1 );
foreach my $subdir ( 'longascii', 'adatbázis', 'name with spaces', '¿¿¿ ¿¿¿¿¿¿') {
+ if ($^O eq 'cygwin') {
+ next if (($subdir eq 'adatbázis') || ($subdir eq '¿¿¿ ¿¿¿¿¿¿'));
+ }
utf8::upgrade($subdir);
ok(
mkdir(catdir($dir, $subdir)),
@@ -88,4 +91,4 @@
return join '', grep { defined } Win32::GetShortPathName($dir), $file, $suffix;
}
return $path;
-}
\ No newline at end of file
+}
Subject: | test_out.txt |
1..25
ok 1 - longascii created
ok 2 - The object isa DBI::db
ok 3 - Could connect to database in longascii
ok 4 - The object isa DBI::db
ok 5 - Could connect to database in longascii
ok 6 - Could connect to database in /tmp/XUCGVa2zDc/longascii.db
ok 7 - adatbázis created
not ok 8 - Could connect to database in adatbázis
# Failed test 'Could connect to database in adatbázis'
# at t/33_non_latin_path.t.orig line 48.
# got: 'DBI connect('dbname=/tmp/XUCGVa2zDc/adatbázis/db.db','',...) failed: unable to open database file at t/33_non_latin_path.t.orig line 42
# '
# expected: ''
# DBI connect('dbname=/tmp/XUCGVa2zDc/adatbázis/db.db','',...) failed: unable to open database file at t/33_non_latin_path.t.orig line 42
not ok 9 - Could connect to database in adatbázis
# Failed test 'Could connect to database in adatbázis'
# at t/33_non_latin_path.t.orig line 62.
# got: 'DBI connect('dbname=/tmp/XUCGVa2zDc/adatbázis/db.db','',...) failed: unable to open database file at t/33_non_latin_path.t.orig line 55
# '
# expected: ''
# DBI connect('dbname=/tmp/XUCGVa2zDc/adatbázis/db.db','',...) failed: unable to open database file at t/33_non_latin_path.t.orig line 55
ok 10 - Could connect to database in /tmp/XUCGVa2zDc/adatbázis.db
ok 11 - name with spaces created
ok 12 - The object isa DBI::db
ok 13 - Could connect to database in name with spaces
ok 14 - The object isa DBI::db
ok 15 - Could connect to database in name with spaces
ok 16 - Could connect to database in /tmp/XUCGVa2zDc/name with spaces.db
ok 17 - ¿¿¿ ¿¿¿¿¿¿ created
not ok 18 - Could connect to database in ¿¿¿ ¿¿¿¿¿¿
# Failed test 'Could connect to database in ¿¿¿ ¿¿¿¿¿¿'
# at t/33_non_latin_path.t.orig line 48.
# got: 'DBI connect('dbname=/tmp/XUCGVa2zDc/¿¿¿ ¿¿¿¿¿¿/db.db','',...) failed: unable to open database file at t/33_non_latin_path.t.orig line 42
# '
# expected: ''
# DBI connect('dbname=/tmp/XUCGVa2zDc/¿¿¿ ¿¿¿¿¿¿/db.db','',...) failed: unable to open database file at t/33_non_latin_path.t.orig line 42
not ok 19 - Could connect to database in ¿¿¿ ¿¿¿¿¿¿
# Failed test 'Could connect to database in ¿¿¿ ¿¿¿¿¿¿'
# at t/33_non_latin_path.t.orig line 62.
# got: 'DBI connect('dbname=/tmp/XUCGVa2zDc/¿¿¿ ¿¿¿¿¿¿/db.db','',...) failed: unable to open database file at t/33_non_latin_path.t.orig line 55
# '
# expected: ''
# DBI connect('dbname=/tmp/XUCGVa2zDc/¿¿¿ ¿¿¿¿¿¿/db.db','',...) failed: unable to open database file at t/33_non_latin_path.t.orig line 55
ok 20 - Could connect to database in /tmp/XUCGVa2zDc/¿¿¿ ¿¿¿¿¿¿.db
ok 21 - no warnings
# Looks like you planned 25 tests but ran 21.
# Looks like you failed 4 tests of 21 run.