Test results for Linux |
Test for a new element inserted at the level specified with file contents for its data.
Pass
cat _INPUT_DATA_ ¦ xmlfy -S schema.dtd -F2 : -T1 insertfile data _INSERT_DATA_ -T2:1,3,5 insert notes "login restricted"
root:x:0:0:Super-User:/:/sbin/sh bin:x:2:2::/usr/bin: guest:x:501:513:Guest user:/home/guest:/bin/rsh ag:x:600:602:Arthur Gouros:/home/ag:/bin/bash webdav:*LK*:701:703:Web Dav user:/etc/webdav:/bin/false
<!ELEMENT passwd (user*)> <!ELEMENT user (name, pw, uid, gid, fullname?, home?, shell?)> <!ELEMENT name (#PCDATA)> <!ELEMENT pw (#PCDATA)> <!ELEMENT uid (#PCDATA)> <!ELEMENT gid (#PCDATA)> <!ELEMENT fullname (#PCDATA)> <!ELEMENT home (#PCDATA)> <!ELEMENT shell (#PCDATA)>
root:x:0:0:Super-User:/:/sbin/sh bin:x:2:2::/usr/bin: guest:x:501:513:Guest user:/home/guest:/bin/rsh ag:x:600:602:Arthur Gouros:/home/ag:/bin/bash webdav:*LK*:701:703:Web Dav user:/etc/webdav:/bin/false
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE passwd SYSTEM "schema.dtd"> <passwd> <data>root:x:0:0:Super-User:/:/sbin/sh bin:x:2:2::/usr/bin: guest:x:501:513:Guest user:/home/guest:/bin/rsh ag:x:600:602:Arthur Gouros:/home/ag:/bin/bash webdav:*LK*:701:703:Web Dav user:/etc/webdav:/bin/false </data> <user> <notes>login restricted</notes> <name>root</name> <pw>x</pw> <uid>0</uid> <gid>0</gid> <fullname>Super-User</fullname> <home>/</home> <shell>/sbin/sh</shell> </user> <user> <name>bin</name> <pw>x</pw> <uid>2</uid> <gid>2</gid> <fullname></fullname> <home>/usr/bin</home> <shell></shell> </user> <user> <notes>login restricted</notes> <name>guest</name> <pw>x</pw> <uid>501</uid> <gid>513</gid> <fullname>Guest user</fullname> <home>/home/guest</home> <shell>/bin/rsh</shell> </user> <user> <name>ag</name> <pw>x</pw> <uid>600</uid> <gid>602</gid> <fullname>Arthur Gouros</fullname> <home>/home/ag</home> <shell>/bin/bash</shell> </user> <user> <notes>login restricted</notes> <name>webdav</name> <pw>*LK*</pw> <uid>701</uid> <gid>703</gid> <fullname>Web Dav user</fullname> <home>/etc/webdav</home> <shell>/bin/false</shell> </user> </passwd>