summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2012-01-24 12:29:09 -0500
committerNalin Dahyabhai <nalin@redhat.com>2012-01-24 12:29:09 -0500
commit516eb50a45ac8debd53e14fb28dc38ecef1be2ee (patch)
tree1d58c5ec52bec8e9a0aec8ef7dba716b9d974858 /tests
parentc83ccc440299a2d063fc7f5289d1ed459d26231d (diff)
downloadslapi-nis-516eb50a45ac8debd53e14fb28dc38ecef1be2ee.tar.gz
slapi-nis-516eb50a45ac8debd53e14fb28dc38ecef1be2ee.tar.xz
slapi-nis-516eb50a45ac8debd53e14fb28dc38ecef1be2ee.zip
- add multiple-result capable versions of match/regmatch/regsub
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test37-nis-multi/before.sh8
-rw-r--r--tests/test37-nis-multi/before.txt49
-rw-r--r--tests/test37-nis-multi/description.txt1
-rw-r--r--tests/test37-nis-multi/dse.ldif20
-rw-r--r--tests/test37-nis-multi/userRoot.ldif18
5 files changed, 96 insertions, 0 deletions
diff --git a/tests/test37-nis-multi/before.sh b/tests/test37-nis-multi/before.sh
new file mode 100755
index 0000000..a49cf3e
--- /dev/null
+++ b/tests/test37-nis-multi/before.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo map list:
+$YP maplist example.com
+$YP -c maplist example.com
+for map in name2mac mac2name ; do
+ echo all contents of example.com:"$map":
+ $YP -c all example.com $map | LANG=C sort
+done
diff --git a/tests/test37-nis-multi/before.txt b/tests/test37-nis-multi/before.txt
new file mode 100644
index 0000000..32c84a2
--- /dev/null
+++ b/tests/test37-nis-multi/before.txt
@@ -0,0 +1,49 @@
+map list:
+mac2name
+name2mac
+mac2name
+name2mac
+all contents of example.com:name2mac:
+testbox1 01:02:03:04:05:06 testbox1
+testbox1 01:02:03:04:05:07 testbox1
+testbox1 01:02:03:04:05:08 testbox1
+testbox1 01:02:03:04:05:09 testbox1
+testbox1 01:02:03:04:05:0a testbox1
+testbox1 01:02:03:04:05:0b testbox1
+testbox1 01:02:03:04:05:0c testbox1
+testbox2 01:02:03:04:05:06 testbox2
+testbox2 01:02:03:04:05:07 testbox2
+testbox2 01:02:03:04:05:08 testbox2
+testbox2 01:02:03:04:05:09 testbox2
+testbox2 01:02:03:04:05:0a testbox2
+testbox2 01:02:03:04:05:0b testbox2
+testbox2 01:02:03:04:05:0c testbox2
+testbox3 01:02:03:04:05:06 testbox3
+testbox3 01:02:03:04:05:07 testbox3
+testbox3 01:02:03:04:05:08 testbox3
+testbox3 01:02:03:04:05:09 testbox3
+testbox3 01:02:03:04:05:0a testbox3
+testbox3 01:02:03:04:05:0b testbox3
+testbox3 01:02:03:04:05:0c testbox3
+all contents of example.com:mac2name:
+01:02:03:04:05:06 01:02:03:04:05:06 testbox1
+01:02:03:04:05:06 01:02:03:04:05:06 testbox2
+01:02:03:04:05:06 01:02:03:04:05:06 testbox3
+01:02:03:04:05:07 01:02:03:04:05:07 testbox1
+01:02:03:04:05:07 01:02:03:04:05:07 testbox2
+01:02:03:04:05:07 01:02:03:04:05:07 testbox3
+01:02:03:04:05:08 01:02:03:04:05:08 testbox1
+01:02:03:04:05:08 01:02:03:04:05:08 testbox2
+01:02:03:04:05:08 01:02:03:04:05:08 testbox3
+01:02:03:04:05:09 01:02:03:04:05:09 testbox1
+01:02:03:04:05:09 01:02:03:04:05:09 testbox2
+01:02:03:04:05:09 01:02:03:04:05:09 testbox3
+01:02:03:04:05:0a 01:02:03:04:05:0a testbox1
+01:02:03:04:05:0a 01:02:03:04:05:0a testbox2
+01:02:03:04:05:0a 01:02:03:04:05:0a testbox3
+01:02:03:04:05:0b 01:02:03:04:05:0b testbox1
+01:02:03:04:05:0b 01:02:03:04:05:0b testbox2
+01:02:03:04:05:0b 01:02:03:04:05:0b testbox3
+01:02:03:04:05:0c 01:02:03:04:05:0c testbox1
+01:02:03:04:05:0c 01:02:03:04:05:0c testbox2
+01:02:03:04:05:0c 01:02:03:04:05:0c testbox3
diff --git a/tests/test37-nis-multi/description.txt b/tests/test37-nis-multi/description.txt
new file mode 100644
index 0000000..2f296c8
--- /dev/null
+++ b/tests/test37-nis-multi/description.txt
@@ -0,0 +1 @@
+multiple regsub (mregsub)
diff --git a/tests/test37-nis-multi/dse.ldif b/tests/test37-nis-multi/dse.ldif
new file mode 100644
index 0000000..6c32914
--- /dev/null
+++ b/tests/test37-nis-multi/dse.ldif
@@ -0,0 +1,20 @@
+dn: nis-domain=example.com+nis-map=name2mac,cn=NIS Server,cn=plugins,cn=config
+objectClass: top
+objectClass: extensibleObject
+nis-domain: example.com
+nis-map: name2mac
+nis-base: cn=computers, cn=Accounts, dc=example, dc=com
+nis-filter: objectclass=ieee802device
+nis-keys-format: %mregsub("%{macaddress} %{cn}","(..:..:..:..:..:..) (.*)","%2")
+nis-values-format: %{macaddress} %{cn}
+
+dn: nis-domain=example.com+nis-map=mac2name,cn=NIS Server,cn=plugins,cn=config
+objectClass: top
+objectClass: extensibleObject
+nis-domain: example.com
+nis-map: mac2name
+nis-base: cn=computers, cn=Accounts, dc=example, dc=com
+nis-filter: objectclass=ieee802device
+nis-keys-format: %mregsub("%{macaddress} %{cn}","(..:..:..:..:..:..) (.*)","%1")
+nis-values-format: %{macaddress} %{cn}
+
diff --git a/tests/test37-nis-multi/userRoot.ldif b/tests/test37-nis-multi/userRoot.ldif
new file mode 100644
index 0000000..98727a6
--- /dev/null
+++ b/tests/test37-nis-multi/userRoot.ldif
@@ -0,0 +1,18 @@
+dn: cn=computers, cn=Accounts, dc=example, dc=com
+objectClass: nsContainer
+cn: computers
+
+dn: cn=testbox1, cn=computers, cn=Accounts, dc=example, dc=com
+objectClass: ieee802device
+objectClass: device
+cn: testbox1
+cn: testbox2
+cn: testbox3
+macAddress: 01:02:03:04:05:06
+macAddress: 01:02:03:04:05:07
+macAddress: 01:02:03:04:05:08
+macAddress: 01:02:03:04:05:09
+macAddress: 01:02:03:04:05:0a
+macAddress: 01:02:03:04:05:0b
+macAddress: 01:02:03:04:05:0c
+