Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
1fcb843c
Commit
1fcb843c
authored
Nov 01, 2015
by
Mithgol the Webmaster
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skip JSON tests only when `--sqlite=/usr` (or similar) is tested
parent
fe4812ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
build_against_node.sh
scripts/build_against_node.sh
+3
-0
json.test.js
test/json.test.js
+17
-8
No files found.
scripts/build_against_node.sh
View file @
1fcb843c
...
@@ -20,6 +20,7 @@ npm test
...
@@ -20,6 +20,7 @@ npm test
publish
publish
# now test building against shared sqlite
# now test building against shared sqlite
export
NODE_SQLITE3_JSON1
=
no
if
[[
$(
uname
-s
)
==
'Darwin'
]]
;
then
if
[[
$(
uname
-s
)
==
'Darwin'
]]
;
then
brew install sqlite
brew install sqlite
npm install
--build-from-source
--sqlite
=
$(
brew
--prefix
)
--clang
=
1
npm install
--build-from-source
--sqlite
=
$(
brew
--prefix
)
--clang
=
1
...
@@ -27,6 +28,7 @@ else
...
@@ -27,6 +28,7 @@ else
npm install
--build-from-source
--sqlite
=
/usr
--clang
=
1
npm install
--build-from-source
--sqlite
=
/usr
--clang
=
1
fi
fi
npm
test
npm
test
export
NODE_SQLITE3_JSON1
=
yes
platform
=
$(
uname
-s
| sed
"y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
)
platform
=
$(
uname
-s
| sed
"y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
)
...
@@ -61,6 +63,7 @@ if [[ $(uname -s) == 'Linux' ]]; then
...
@@ -61,6 +63,7 @@ if [[ $(uname -s) == 'Linux' ]]; then
# broken for some unknown reason against io.js
# broken for some unknown reason against io.js
if [[ ${NODE_VERSION:0:4} != '
iojs
' ]]; then
if [[ ${NODE_VERSION:0:4} != '
iojs
' ]]; then
# test source compile in 32 bit mode against external libsqlite3
# 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
CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr --clang=1
npm test
npm test
fi
fi
...
...
test/json.test.js
View file @
1fcb843c
var
sqlite3
=
require
(
'..'
);
var
sqlite3
=
require
(
'..'
);
describe
.
skip
(
'json'
,
function
()
{
if
(
process
.
env
.
NODE_SQLITE3_JSON1
===
'no'
){
var
db
;
describe
(
'json'
,
function
()
{
it
(
before
(
function
(
done
)
{
'skips JSON tests when --sqlite=/usr (or similar) is tested'
,
db
=
new
sqlite3
.
Database
(
':memory:'
,
done
);
function
(){}
);
});
});
}
else
{
describe
(
'json'
,
function
()
{
var
db
;
before
(
function
(
done
)
{
db
=
new
sqlite3
.
Database
(
':memory:'
,
done
);
});
it
(
'should select JSON'
,
function
(
done
)
{
it
(
'should select JSON'
,
function
(
done
)
{
db
.
run
(
'SELECT json(?)'
,
JSON
.
stringify
({
ok
:
true
}),
done
);
db
.
run
(
'SELECT json(?)'
,
JSON
.
stringify
({
ok
:
true
}),
done
);
});
});
});
}
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment