/ Check-in [893e6089]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Modify a test case in zipfile2.test to take into account that with some platform/file-system combinations it is possible to fopen() and fread() (but not fwrite()) a directory.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 893e6089c875e947ddadb23f031a81bc36da8b060d2212363098992ddb90378b
User & Date: dan 2018-04-19 20:06:10
Context
2018-04-19
21:29
Minor simplification to the upsert logic. check-in: e657c1d6 user: drh tags: trunk
20:06
Modify a test case in zipfile2.test to take into account that with some platform/file-system combinations it is possible to fopen() and fread() (but not fwrite()) a directory. check-in: 893e6089 user: dan tags: trunk
16:52
Add the --upsert option to the wordcount test program. check-in: ee1e750b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to test/zipfile2.test.

    48     48     CREATE VIRTUAL TABLE bbb USING zipfile("testzip");
    49     49     CREATE VIRTUAL TABLE ccc USING zipfile(`testzip`);
    50     50     CREATE VIRTUAL TABLE ddd USING zipfile([testzip]);
    51     51     CREATE VIRTUAL TABLE eee USING zipfile(testzip);
    52     52     CREATE VIRTUAL TABLE fff USING zipfile('test''zip');
    53     53   }
    54     54   
    55         -if {$::tcl_platform(platform)=="windows"} {
    56         -  set res {1 {cannot open file: testdir}}
    57         -} else {
    58         -  set res {1 {error in fread()}}
    59         -}
    60     55   do_test 2.0 {
    61     56     forcedelete testdir
    62     57     file mkdir testdir
    63     58     execsql { CREATE VIRTUAL TABLE hhh USING zipfile('testdir') }
    64         -  catchsql { SELECT * FROM hhh } 
    65         -} $res
           59  +  lindex [catchsql { 
           60  +    SELECT * FROM hhh;
           61  +    INSERT INTO hhh(name, data) VALUES('1.txt', 'file data');
           62  +  }] 0 
           63  +} 1
    66     64   
    67     65   
    68     66   set archive {
    69     67     504B0304140000080000D4A52BEC09F3B6E0110000001100000005000900612E
    70     68     747874555405000140420F00636F6E74656E7473206F6620612E747874504B03
    71     69     04140000080000D4A52BECD98916A7110000001100000005000900622E747874
    72     70     555405000140420F00636F6E74656E7473206F6620622E747874504B01021E03