diff options
author | daurnimator <quae@daurnimator.com> | 2017-09-03 21:13:09 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-09-03 21:16:31 +1000 |
commit | dbe9317aed79bb65f16e5cb680971760dbe5f6a6 (patch) | |
tree | c1bcba62c19ed0e737fdfcbdcace8fa4c728e80b /regress | |
parent | 40e76e4283e69c13da9cf6cdf4290036e3c247d7 (diff) | |
download | luaossl-dbe9317aed79bb65f16e5cb680971760dbe5f6a6.tar.gz luaossl-dbe9317aed79bb65f16e5cb680971760dbe5f6a6.tar.bz2 luaossl-dbe9317aed79bb65f16e5cb680971760dbe5f6a6.zip |
Don't reset metamethods when reset is 0
Fixes issue where interposed methods were discarded if any more C modules were loaded
Closes #104
Diffstat (limited to 'regress')
-rw-r--r-- | regress/104-interposition-discarded.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/regress/104-interposition-discarded.lua b/regress/104-interposition-discarded.lua new file mode 100644 index 0000000..4261bcb --- /dev/null +++ b/regress/104-interposition-discarded.lua @@ -0,0 +1,12 @@ +#!/usr/bin/env lua + +require"regress".export".*" + +local ssl_context = require "openssl.ssl.context" + +local value = {} +ssl_context.interpose("foo", value) +check(ssl_context.new().foo == value, "interpose failed") + +require "openssl.ssl" -- Pick a module that doesn't get loaded by regress.lua +check(ssl_context.new().foo == value, "loading a module reset methods") |