Test results for Win32 Console

test_010010_example_passwd

Test description

Test for correct functionality of the examples used in the xmlfy documentation.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -S schema.dtd -F :

Input 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

Schema

<!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)>

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE passwd SYSTEM "schema.dtd">
<passwd>
  <user>
    <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>
    <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>
    <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>

Goto:   Top of page.   Section "Environment".   Section "Summary".   Section "Test cases".