Test results for Win32 Console

test_001071_option_fieldseparator_scope

Test description

Test for scoped user specified level 2 delimiter creating level 2 elements
from the input stream that are constrained by this scope. 
The 2nd and 3rd occurrences of the specified level 2 delimiter are outside
the scope and should therefore be treated as data.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -F2:1,4-$ : -s

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

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xmlfy SYSTEM "xmlfy.dtd">
<xmlfy>
  <line>
    <field>root</field>
    <field>x:0:0</field>
    <field>Super-User</field>
    <field>/</field>
    <field>/sbin/sh</field>
  </line>
  <line>
    <field>bin</field>
    <field>x:2:2</field>
    <field></field>
    <field>/usr/bin</field>
    <field></field>
  </line>
  <line>
    <field>guest</field>
    <field>x:501:513</field>
    <field>Guest user</field>
    <field>/home/guest</field>
    <field>/bin/rsh</field>
  </line>
  <line>
    <field>ag</field>
    <field>x:600:602</field>
    <field>Arthur Gouros</field>
    <field>/home/ag</field>
    <field>/bin/bash</field>
  </line>
  <line>
    <field>webdav</field>
    <field>*LK*:701:703</field>
    <field>Web Dav user</field>
    <field>/etc/webdav</field>
    <field>/bin/false</field>
  </line>
</xmlfy>
<xmlfy_summary>
  <version>1.5.7</version>
  <timestamp>
    <start>Wed Feb 05 20:47:51 2020</start>
    <end>Wed Feb 05 20:47:51 2020</end>
  </timestamp>
  <md5_input>f0ca904bb4d461cc98c113a19b471a77</md5_input>
  <md5_output>fb6e0e53c6059482728e20c8416a612c</md5_output>
  <sha512_input>2631bc33be781b4b79fe6ac30d1682d26337842f0020b28cf3016f125721f619191e8fb266bca594c4dd8aa8aa66ef2af5cad651b236888b4624619c2ce742ba</sha512_input>
  <sha512_output>97a7955f647e91e599cc89c07ab6e9c2c580cbe9b2ed36c89274057afac057b644810c1194f1181d2025394192a0f6f637a274bd2767dfc1539ca724b062a99e</sha512_output>
  <args>
    <command>
      <arg>H:\Projects\vc\xmlfy\src\xmlfy\xmlfy.exe</arg>
      <arg>-X</arg>
      <arg>newline</arg>
      <arg>unix</arg>
      <arg>-F2:1,4-$</arg>
      <arg>:</arg>
      <arg>-s</arg>
    </command>
  </args>
  <separator>
    <level1>
      <delimiter>NEWLINE</delimiter>
    </level1>
    <level2>
      <delimiter scope="1,4-MAX">:</delimiter>
    </level2>
  </separator>
  <schema>
    <default>true</default>
    <records>
      <read>5</read>
      <expelled>0</expelled>
      <matched>5</matched>
      <unmatched>0</unmatched>
      <ignoredblank>0</ignoredblank>
      <printed>5</printed>
    </records>
  </schema>
</xmlfy_summary>

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