2010-09-04 21:05:28 -04:00
|
|
|
USING: continuations db db.sqlite io.directories io.files.temp
|
2010-09-17 02:52:49 -04:00
|
|
|
webapps.mason.backend tools.test ;
|
|
|
|
IN: webapps.mason.backend.tests
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2014-10-03 06:53:16 -04:00
|
|
|
[ "mason-test.db" temp-file delete-file ] ignore-errors
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2015-07-02 16:37:42 -04:00
|
|
|
[ 0 1 2 ] [
|
2010-09-30 23:35:35 -04:00
|
|
|
! Do it in a with-transaction to simulate semantics of
|
|
|
|
! with-mason-db
|
2014-10-03 06:53:16 -04:00
|
|
|
"mason-test.db" temp-file <sqlite-db> [
|
2010-09-30 23:35:35 -04:00
|
|
|
[
|
|
|
|
init-mason-db
|
2010-09-04 21:05:28 -04:00
|
|
|
|
2010-09-30 23:35:35 -04:00
|
|
|
counter-value
|
|
|
|
increment-counter-value
|
|
|
|
increment-counter-value
|
|
|
|
] with-transaction
|
2010-09-04 21:05:28 -04:00
|
|
|
] with-db
|
|
|
|
] unit-test
|