Test results for Solaris x86

test_001080_option_columns

Test description

Test for column generated elements. The first element should contain the
complete input record. The second element should only contain the 5th
character of the input record if it exists and use the name specified in
the column option. The third element should contain the 9th character and
above of the input record if they exist and use the name specified in
the quoted column option.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -C 1-$ -C 5-5:third -C '9-$:fiveplus' -T1 number

Input data

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xmlfy SYSTEM "xmlfy.dtd">
<xmlfy>
  <line1>
    <field>1</field>
    <third></third>
    <fiveplus></fiveplus>
  </line1>
  <line2>
    <field>1 2</field>
    <third></third>
    <fiveplus></fiveplus>
  </line2>
  <line3>
    <field>1 2 3</field>
    <third>3</third>
    <fiveplus></fiveplus>
  </line3>
  <line4>
    <field>1 2 3 4</field>
    <third>3</third>
    <fiveplus></fiveplus>
  </line4>
  <line5>
    <field>1 2 3 4 5</field>
    <third>3</third>
    <fiveplus>5</fiveplus>
  </line5>
  <line6>
    <field>1 2 3 4 5 6</field>
    <third>3</third>
    <fiveplus>5 6</fiveplus>
  </line6>
  <line7>
    <field>1 2 3 4 5 6 7</field>
    <third>3</third>
    <fiveplus>5 6 7</fiveplus>
  </line7>
  <line8>
    <field>1 2 3 4 5 6 7 8</field>
    <third>3</third>
    <fiveplus>5 6 7 8</fiveplus>
  </line8>
  <line9>
    <field>1 2 3 4 5 6 7 8 9</field>
    <third>3</third>
    <fiveplus>5 6 7 8 9</fiveplus>
  </line9>
</xmlfy>

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