Commit 1fcb843c by Mithgol the Webmaster

skip JSON tests only when `--sqlite=/usr` (or similar) is tested

parent fe4812ed
......@@ -20,6 +20,7 @@ npm test
publish
# now test building against shared sqlite
export NODE_SQLITE3_JSON1=no
if [[ $(uname -s) == 'Darwin' ]]; then
brew install sqlite
npm install --build-from-source --sqlite=$(brew --prefix) --clang=1
......@@ -27,6 +28,7 @@ else
npm install --build-from-source --sqlite=/usr --clang=1
fi
npm test
export NODE_SQLITE3_JSON1=yes
platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/")
......@@ -61,6 +63,7 @@ if [[ $(uname -s) == 'Linux' ]]; then
# broken for some unknown reason against io.js
if [[ ${NODE_VERSION:0:4} != 'iojs' ]]; then
# test source compile in 32 bit mode against external libsqlite3
export NODE_SQLITE3_JSON1=no
CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr --clang=1
npm test
fi
......
var sqlite3 = require('..');
describe.skip('json', function() {
var db;
before(function(done) {
db = new sqlite3.Database(':memory:', done);
if( process.env.NODE_SQLITE3_JSON1 === 'no' ){
describe('json', function() {
it(
'skips JSON tests when --sqlite=/usr (or similar) is tested',
function(){}
);
});
} else {
describe('json', function() {
var db;
before(function(done) {
db = new sqlite3.Database(':memory:', done);
});
it('should select JSON', function(done) {
db.run('SELECT json(?)', JSON.stringify({ok:true}), done);
it('should select JSON', function(done) {
db.run('SELECT json(?)', JSON.stringify({ok:true}), done);
});
});
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment