diff options
author | Andrew Colin Kissa <andrew@topdog.za.net> | 2016-08-14 13:45:08 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-08-14 13:45:40 +0100 |
commit | 5bde3efabfec675b323501cae5e3a99784afcc31 (patch) | |
tree | bdb8686393521becc0c7552d066afa0646028eff /test | |
parent | eea0defeafb2d80a0ce656518523c0e928df4933 (diff) |
LMDB: introduce as Experimental. Bug 1856
Diffstat (limited to 'test')
-rw-r--r-- | test/aux-fixed/2800.lmdb-mkdb-dump.py | 15 | ||||
-rw-r--r-- | test/aux-fixed/2800.mdb | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | test/aux-fixed/2800.mdb.src | 3 | ||||
-rw-r--r-- | test/confs/2800 | 9 | ||||
-rw-r--r-- | test/scripts/2800-lmdb/2800 | 11 | ||||
-rw-r--r-- | test/scripts/2800-lmdb/REQUIRES | 1 | ||||
-rw-r--r-- | test/stdout/2800 | 9 |
7 files changed, 48 insertions, 0 deletions
diff --git a/test/aux-fixed/2800.lmdb-mkdb-dump.py b/test/aux-fixed/2800.lmdb-mkdb-dump.py new file mode 100644 index 000000000..3de6ba13b --- /dev/null +++ b/test/aux-fixed/2800.lmdb-mkdb-dump.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +import os +import lmdb + +if os.path.exists('2800.mdb'): + os.unlink('2800.mdb') + +env = lmdb.open('2800.mdb', subdir=False); +with env.begin(write=True) as txn: + txn.put('first', 'data for first') + txn.put('second', 'A=1 B=2') + txn.put('third', 'A1:B2:C3') + cursor = txn.cursor() + for key, value in cursor: + print key, "=>", value diff --git a/test/aux-fixed/2800.mdb b/test/aux-fixed/2800.mdb Binary files differnew file mode 100644 index 000000000..2002ee1b5 --- /dev/null +++ b/test/aux-fixed/2800.mdb diff --git a/test/aux-fixed/2800.mdb.src b/test/aux-fixed/2800.mdb.src new file mode 100644 index 000000000..957952720 --- /dev/null +++ b/test/aux-fixed/2800.mdb.src @@ -0,0 +1,3 @@ +first: data for first +second: A=1 B=2 +third: A1:B2:C3 diff --git a/test/confs/2800 b/test/confs/2800 new file mode 100644 index 000000000..607fcf5c7 --- /dev/null +++ b/test/confs/2800 @@ -0,0 +1,9 @@ +# Exim test configuration 2800 + +.include DIR/aux-var/std_conf_prefix + +primary_hostname = myhost.test.ex + +# ----- Main settings ----- + +# End diff --git a/test/scripts/2800-lmdb/2800 b/test/scripts/2800-lmdb/2800 new file mode 100644 index 000000000..a074ae628 --- /dev/null +++ b/test/scripts/2800-lmdb/2800 @@ -0,0 +1,11 @@ +# lmdb lookup +exim -be +${lookup{first}lmdb{DIR/aux-fixed/TESTNUM.mdb}} +${lookup{first}lmdb{DIR/aux-fixed/TESTNUM.mdb}{$value}fail} +${lookup{fail}lmdb{DIR/aux-fixed/TESTNUM.mdb}{$value}{failure value}} +${lookup{fail}lmdb{DIR/aux-fixed/TESTNUM.mdb}{$value}fail} +${lookup{second}lmdb{DIR/aux-fixed/TESTNUM.mdb}{$value}fail} +${extract{A}{${lookup{second}lmdb{DIR/aux-fixed/TESTNUM.mdb}{$value}fail}}} +${extract{B}{${lookup{second}lmdb{DIR/aux-fixed/TESTNUM.mdb}{$value}fail}}} +${extract{C}{${lookup{second}lmdb{DIR/aux-fixed/TESTNUM.mdb}{$value}fail}}{$value}fail} +**** diff --git a/test/scripts/2800-lmdb/REQUIRES b/test/scripts/2800-lmdb/REQUIRES new file mode 100644 index 000000000..c160c4640 --- /dev/null +++ b/test/scripts/2800-lmdb/REQUIRES @@ -0,0 +1 @@ +lookup lmdb diff --git a/test/stdout/2800 b/test/stdout/2800 new file mode 100644 index 000000000..30e14b09d --- /dev/null +++ b/test/stdout/2800 @@ -0,0 +1,9 @@ +> data for first +> data for first +> failure value +> Failed: "lookup" failed and "fail" requested +> A=1 B=2 +> 1 +> 2 +> Failed: "extract" failed and "fail" requested +> |