diff options
author | Eric Wong <e@yhbt.net> | 2020-02-04 04:44:25 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-02-04 21:39:56 +0000 |
commit | 253a86b7bf4a3d81118e91f4ebb77844cfbd2b32 (patch) | |
tree | da6b875b9d5f38be331b59adcdd37b5708a4c65a /t | |
parent | fea03df0e2e95ad3ac44ac46d9c31da97fa2fde9 (diff) | |
download | public-inbox-253a86b7bf4a3d81118e91f4ebb77844cfbd2b32.tar.gz |
No need to call ref() and do a string comparison. Add some extra tests using the {ReadOnly} attribute in DBI.pm.
Diffstat (limited to 't')
-rw-r--r-- | t/over.t | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -18,10 +18,15 @@ is($y, $x+1, 'tid increases'); $x = $over->sid('hello-world'); is(int($x), $x, 'integer sid'); $y = $over->sid('hello-WORLD'); -is($y, $x+1, 'sid ncreases'); +is($y, $x+1, 'sid increases'); is($over->sid('hello-world'), $x, 'idempotent'); +ok(!$over->{dbh}->{ReadOnly}, 'OverIdx is not ReadOnly'); $over->disconnect; +$over = PublicInbox::Over->new("$tmpdir/over.sqlite3"); +$over->connect; +ok($over->{dbh}->{ReadOnly}, 'Over is ReadOnly'); + $over = PublicInbox::OverIdx->new("$tmpdir/over.sqlite3"); $over->connect; is($over->sid('hello-world'), $x, 'idempotent across reopen'); |