Permalink
Browse files

tests: test-tls-client-abort2.lua: add

initial commit
  • Loading branch information...
1 parent bedd19a commit db03bbe2341ceb10ab9e1a3e349ec74a2e38edf3 Brandon Philips committed Apr 13, 2012
Showing with 28 additions and 0 deletions.
  1. +28 −0 tests/test-tls-client-abort2.lua
View
28 tests/test-tls-client-abort2.lua
@@ -0,0 +1,28 @@
+require('helper')
+local fixture = require('./fixture-tls')
+local tls = require('tls')
+
+local options = {
+ cert = fixture.certPem,
+ key = fixture.certKey,
+ port = fixture.commonPort,
+ host = '127.0.0.1'
+}
+
+local errors = 0
+
+local conn = tls.connect(options, {}, function()
+ assert(true)
+end)
+
+conn:on('error', function(err)
+ p(err)
+ errors = errors + 1
+ doesnt_throw(function()
+ conn:destroy()
+ end)
+end)
+
+process:on('exit', function()
+ assert(errors == 1)
+end)

0 comments on commit db03bbe

Please sign in to comment.