Test results for Linux |
Test for a new element re-inserted at the level specified with file contents for its data.
Pass
cat _INPUT_DATA_ ¦ xmlfy -S schema.dtd -F2 : -T1:2,4 reinsertfile data _INSERT_DATA_ -T2:1,3,5 reinsert notes "reinserted field"
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> <user> <notes>reinserted field</notes> <name>root</name> <pw>x</pw> <notes>reinserted field</notes> <uid>0</uid> <gid>0</gid> <notes>reinserted field</notes> <fullname>Super-User</fullname> <home>/</home> <shell>/sbin/sh</shell> </user> <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>reinserted field</notes> <name>bin</name> <pw>x</pw> <notes>reinserted field</notes> <uid>2</uid> <gid>2</gid> <notes>reinserted field</notes> <fullname></fullname> <home>/usr/bin</home> <shell></shell> </user> <user> <notes>reinserted field</notes> <name>guest</name> <pw>x</pw> <notes>reinserted field</notes> <uid>501</uid> <gid>513</gid> <notes>reinserted field</notes> <fullname>Guest user</fullname> <home>/home/guest</home> <shell>/bin/rsh</shell> </user> <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>reinserted field</notes> <name>ag</name> <pw>x</pw> <notes>reinserted field</notes> <uid>600</uid> <gid>602</gid> <notes>reinserted field</notes> <fullname>Arthur Gouros</fullname> <home>/home/ag</home> <shell>/bin/bash</shell> </user> <user> <notes>reinserted field</notes> <name>webdav</name> <pw>*LK*</pw> <notes>reinserted field</notes> <uid>701</uid> <gid>703</gid> <notes>reinserted field</notes> <fullname>Web Dav user</fullname> <home>/etc/webdav</home> <shell>/bin/false</shell> </user> </passwd>