不要怂,就是干,撸起袖子干!

Commit 47b81bcb by Daniel Durante

Merge branch 'master' into milestones/2.0.0

2 parents 60fa2ff8 070869d1
[submodule "test/binary/bats"]
path = test/binary/bats
url = https://github.com/sstephenson/bats.git
...@@ -4,6 +4,7 @@ before_script: ...@@ -4,6 +4,7 @@ before_script:
script: script:
- "make test" - "make test"
- "make binary"
notifications: notifications:
email: email:
......
...@@ -26,6 +26,8 @@ postgres: ...@@ -26,6 +26,8 @@ postgres:
@DIALECT=postgres make test @DIALECT=postgres make test
postgres-native: postgres-native:
@DIALECT=postgres-native make test @DIALECT=postgres-native make test
binary:
@./test/binary/test.bats
# test aliases # test aliases
...@@ -34,6 +36,6 @@ postgresn: postgres-native ...@@ -34,6 +36,6 @@ postgresn: postgres-native
# test all the dialects \o/ # test all the dialects \o/
all: sqlite mysql postgres postgres-native all: sqlite mysql postgres postgres-native binary
.PHONY: sqlite mysql postgres pgsql postgres-native postgresn all test .PHONY: sqlite mysql postgres pgsql postgres-native postgresn all test binary
\ No newline at end of file
...@@ -711,8 +711,8 @@ module.exports = (function() { ...@@ -711,8 +711,8 @@ module.exports = (function() {
var template = '<%= protocol %>://<%= user %>:<%= password %>@<%= host %><% if(port) { %>:<%= port %><% } %>/<%= database %>' var template = '<%= protocol %>://<%= user %>:<%= password %>@<%= host %><% if(port) { %>:<%= port %><% } %>/<%= database %>'
return Utils._.template(template)({ return Utils._.template(template)({
user: encodeURIComponent(config.username), user: config.username,
password: encodeURIComponent(config.password), password: config.password,
database: config.database, database: config.database,
host: config.host, host: config.host,
port: config.port, port: config.port,
......
Subproject commit bc72b8587183be3f973292d6bf547adf864e7f9b
#!/usr/bin/env test/binary/bats/bin/bats
@test "no arguments prints usage instructions" {
run bin/sequelize
[ $status -eq 0 ]
[ $(expr "${lines[0]}" : "Using environment 'development'.") -ne 0 ]
[ $(expr "${lines[1]}" : "Try \"sequelize --help\" for usage information.") -ne 0 ]
}
@test "--help prints the help" {
run bin/sequelize --help
[ $status -eq 0 ]
[ "${lines[0]}" = " Usage: sequelize [options]" ]
}
@test "-h prints the help" {
run bin/sequelize -h
[ $status -eq 0 ]
[ "${lines[0]}" = " Usage: sequelize [options]" ]
}
@test "--version prints the current version" {
run bin/sequelize --version
[ $status -eq 0 ]
[ "${lines[0]}" = `cat package.json|grep version|cut -f2 -d:|cut -f2 -d\"` ]
}
@test "-V prints the current version" {
run bin/sequelize -V
[ $status -eq 0 ]
[ "${lines[0]}" = `cat package.json|grep version|cut -f2 -d:|cut -f2 -d\"` ]
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!