From b20028bb2ac0325e6d82bcbf197ebc937f834283 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 7 May 2017 18:51:57 +0100 Subject: [PATCH] test scalar promoted to list --- xt/20-checkacl.t | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xt/20-checkacl.t b/xt/20-checkacl.t index 7e8c678b..464f0cb4 100644 --- a/xt/20-checkacl.t +++ b/xt/20-checkacl.t @@ -93,12 +93,18 @@ ok(check_acl('127.0.0.1',[@conf[9,0,20]]), 'AND: !prefix, name'); ok(check_acl('127.0.0.1',[@conf[7,11,0,20]]), 'AND: !prefix, !range, name'); ok(check_acl('127.0.0.1',[@conf[9,13,16,0,20]]), 'AND: !prefix, !range, !regexp, name'); +# group ref is(check_acl('192.0.2.1',[$conf[22]]), 1, '!missing group ref'); is(check_acl('192.0.2.1',[$conf[21]]), 0, 'failed missing group ref'); setting('host_groups')->{'groupreftest'} = ['192.0.2.1']; is(check_acl('192.0.2.1',[$conf[21]]), 1, 'group ref'); is(check_acl('192.0.2.1',[$conf[22]]), 0, 'failed !missing group ref'); +# scalar promoted to list +ok(check_acl('localhost',$conf[0]), 'scalar promoted'); +ok(check_acl('localhost',$conf[1]), 'not scalar promoted'); +is(check_acl('www.microsoft.com',$conf[0]), 0, 'failed scalar promoted'); + # device property # negated device property