# t:t
# d: logmft1.regex() conversion

import pytest, util
import re, json
import logfmt1
    
def _logfmt(i):
    def run():
        inp, out = f"test/logfmt_{i}.inp", f"test/logfmt_{i}.out"
        fmt = json.loads(util.inp_read(inp))
        fmt = logfmt1.regex(fmt)
        util.out_test(fmt, out)
        #re.compile(logfmt1.rx2re(regex))
    return run

logfmt_1 = _logfmt("apache")
logfmt_2 = _logfmt("apache_ext")
