Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created October 20, 2017 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/8646c6815619ad858bc01fad44a4b30f to your computer and use it in GitHub Desktop.
Save Whateverable/8646c6815619ad858bc01fad44a4b30f to your computer and use it in GitHub Desktop.
committable6
2017.09,HEAD https://gist.githubusercontent.com/AlexDaniel/13a57dbb993d624c877befc137c33ee6/raw/a575bf2e04e24ced60b35665a4ec5a3324369c47/dbiish.p6
¦«2017.09»:
# Testing DBDish::SQLite
1..107
ok 1 - Install driver
ok 2 - DBDish::SQLite version 0.1.1
ok 3 - SQLite library version 3.16.2
ok 4 - connect to 'sandbox/dbdish-sqlite-test.sqlite3'
ok 5 - Driver has one connection
ok 6 - # SKIP No server version
ok 7 - No statement executed yet
ok 8 - No statement registered
ok 9 - drop table if exists works
ok 10 - Statement registered
ok 11 - was GC-ected, so Finished
ok 12 - do: create table returns True
ok 13 - do: create table nom returns 0
ok 14 - err after successful create should be 0
ok 15 - errstr after successful create should be empty
ok 16 - A different statement id
ok 17 - insert without parameters called from do
ok 18 - simple insert should report 1 row affected
ok 19 - prepare an insert command with one string parameter
ok 20 - Not executed yet
ok 21 - So Finished
ok 22 - Rows undefined
ok 23 - execute one with one string parameter
ok 24 - Was executed
ok 25 - execute on DML statement should leave finished
ok 26 - The expected Statement
ok 27 - execute one with one string parameter should return 1 row affected
ok 28 - $sth.rows for execute one with one string parameter should report 1 row affected
ok 29 - Can dispose a StatementHandle
ok 30 - Already disposed
ok 31 - prepare an insert command with one integer parameter
ok 32 - New statement sould not be marked executed yet
ok 33 - execute one with one integer parameter
ok 34 - execute on DML statement should leave finished
ok 35 - execute one with one integer parameter should return 1 row affected
ok 36 - $sth.rows for execute one with one integer parameter should report 1 row affected
ok 37 - prepare an insert command with one float parameter
ok 38 - execute one with one float parameter
ok 39 - execute one with one float parameter should return 1 row affected
ok 40 - $sth.rows for execute one with one float parameter should report 1 row affected
ok 41 - prepare an insert command with parameters
ok 42 - execute twice with parameters
ok 43 - Was executed twice
ok 44 - Multiple execute finished
ok 45 - each level reports the same rows affected
ok 46 - # SKIP $sth.bind_param_array() and $sth.execute_array() not implemented
ok 47 - # SKIP $sth.bind_param_array() and $sth.execute_array() not implemented
ok 48 - prepare a select command without parameters
ok 49 - SELECT statement sould not be marked executed yet
ok 50 - execute a prepared select statement without parameters
ok 51 - SELECT statement sould now be marked executed
not ok 52 - In an ideal world should returns rows available # TODO Will probably fails for the lack of proper capabilities announce
# Failed test 'In an ideal world should returns rows available'
# at /home/bisectable/git/whateverable/data/all-modules/github/perl6/DBIish/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 187
# expected: '6'
# got: '0'
ok 53 - $sth.rows after fetch-array should report all
ok 54 - And marked Finished
ok 55 - fetchall-array returns 6 rows
ok 56 - selected data be fetchall-array matches
ok 57 - statement can be re-executed
ok 58 - called column-name
ok 59 - column-name returns 5
ok 60 - column-name matched test data
ok 61 - called column-type
ok 62 - column-type returns 5 fields in a row
ok 63 - column-types matches test data
ok 64 - Test the type of a Str field
ok 65 - Test the type of an Int field
ok 66 - Test the type of a NUMERIC like field
ok 67 - HASH: Test the type of a Str field
ok 68 - HASH: Test the type of a Int field
ok 69 - HASH: Test the type of a NUMERIC like field
ok 70 - No more rows needed
ok 71 - Finished indeed
ok 72 - Can re-execute after explicit finish
ok 73 - call allrows works
ok 74 - Test allrows, get 6 rows
ok 75 - Selected data still matches
ok 76 - Test allrows(:hash-of-array)
ok 77 - types and values match
ok 78 - can prepare 'SELECT NULL'
ok 79 - SELECT return one row
ok 80 - An array
ok 81 - with a column
ok 82 - NULL returns an undefined value
ok 83 - After one row is finished
ok 84 - insert new value for fetchrow_arrayref test
ok 85 - new insert statement executed
ok 86 - insert reports 1 row affected
ok 87 - prepare new select for fetchrow_arrayref test
ok 88 - called fetchrow_arrayref
ok 89 - fetchrow_arrayref returns 4 fields in a row
ok 90 - selected data matches test data of fetchrow_arrayref
ok 91 - can insert single and double quotes
ok 92 - lived while retrieving result
ok 93 - got the right string back
ok 94 - can use question mark in quoted strings
ok 95 - correctly retrieved question mark
ok 96 - a query with no results should have a falsy value
ok 97 - a query with no more results should have a falsy value
ok 98 - A row was successfully retrieved when using a large integer in a prepared statement
ok 99 - The contents of the row fetched via a large integer are correct
ok 100 - The contents of the row fetched via a large integer are correct
ok 101 - The contents of the row fetched via a large integer are correct
ok 102 - final cleanup
ok 103 - .ping is true on a working DB handle
ok 104 - disconnect
ok 105 - Driver has no connections
ok 106 - Already disconnected
ok 107 - Safe to call disconnect on a disconnected handle
¦«HEAD(d37a19e)»:
# Testing DBDish::SQLite
1..107
ok 1 - Install driver
ok 2 - DBDish::SQLite version 0.1.1
ok 3 - SQLite library version 3.16.2
ok 4 - connect to 'sandbox/dbdish-sqlite-test.sqlite3'
ok 5 - Driver has one connection
ok 6 - # SKIP No server version
ok 7 - No statement executed yet
ok 8 - No statement registered
ok 9 - drop table if exists works
ok 10 - Statement registered
ok 11 - was GC-ected, so Finished «exit signal = SIGSEGV (11)»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment