Changeset d395012 for src/tests


Ignore:
Timestamp:
Jul 1, 2017, 5:24:03 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
86f384b
Parents:
b0f7a43
Message:

support separator at end of line

Location:
src/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/tests/.expect/io.txt

    rb0f7a43 rd395012  
    55
    66x (1 x [2 x {3 x =4 x $5 x £6 x ¥7 x ¡8 x ¿9 x «10
    7 1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x
     71, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x 
    88x`1`x'2'x"3"x:4:x 5 x   6       x
    997
     
    1414x
    151510
    16 x
     16x 
    1717x ( 1 ) x 2 , x 3 :x: 4
    1818A
     
    23231.11.21.3
    24241.1+2.3i1.1-2.3i1.1-2.3i
    25  abcxyz
    26 abcxyz
     25 abcxyz 
     26abcxyz 
    2727
    28281.1, $1.2, $1.3
    29291.1+2.3i, $1.1-2.3i, $1.1-2.3i
    30 abc, $xyz
     30abc, $xyz, $
    3131
    32321, 2, 3, 4
     33
    33341, $2, $3 ", $"
    34351 2 3 " "
     36
     37 1 2 3
     3812 3
    3539 1 2 3
    36 12 3
     401 2 3
     41 1 2 3
     42
    3743123
    38441 23
    39451 2 3
     46123
     471 2 3
     48123
     491 2 3
     50
    40511 2 3 4 " "
    41521, 2, 3, 4 ", "
    42531, 2, 3, 4
     54
    43553, 4, a, 7.2
    44563, 4, a, 7.2
  • src/tests/io.c

    rb0f7a43 rd395012  
    1010// Created On       : Wed Mar  2 16:56:02 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun  8 09:52:10 2017
    13 // Update Count     : 51
     12// Last Modified On : Sat Jul  1 16:21:07 2017
     13// Update Count     : 58
    1414//
    1515
     
    108108        [int, int] t1 = [1, 2], t2 = [3, 4];
    109109        sout | t1 | t2 | endl;                                                          // print tuple
     110        sout | endl;
    110111
    111112        sepSet( sout, " " );
     
    114115        sepSet( sout, " " );                                                            // reset separator to " "
    115116        sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl;
     117        sout | endl;
    116118
    117         sout | sepOn | 1 | 2 | 3 | sepOn | endl;                        // separator at start of line
     119        sout | sepOn | 1 | 2 | 3 | sepOn | endl;                        // separator at start/end of line
    118120        sout | 1 | sepOff | 2 | 3 | endl;                                       // locally turn off implicit separator
     121        sout | sepOn | 1 | 2 | 3 | sepOn | sepOff | endl;       // separator at start of line
     122        sout | 1 | 2 | 3 | endl | sepOn;                                        // separator at start of next line
     123        sout | 1 | 2 | 3 | endl;
     124        sout | endl;
    119125
    120126        sout | sepDisable | 1 | 2 | 3 | endl;                           // globally turn off implicit separation
    121127        sout | 1 | sepOn | 2 | 3 | endl;                                        // locally turn on implicit separator
    122         sout | sepEnable | 1 | 2 | 3 | endl;                            // globally turn on implicit separation
     128        sout | sepEnable | 1 | 2 | 3 | endl | sepDisable;       // globally turn on/off implicit separation
     129        sout | 1 | 2 | 3 | endl | sepEnable;                            // globally turn on implicit separation
     130        sout | 1 | 2 | 3 | sepOn | sepDisable | endl;           // ignore seperate at end of line
     131        sout | 1 | 2 | 3 | sepOn | sepEnable | endl;            // separator at end of line
     132        sout | 1 | 2 | 3 | endl;
     133        sout | endl;
    123134
    124135        sepSetTuple( sout, " " );                                                       // set tuple separator from ", " to " "
     
    126137        sepSetTuple( sout, ", " );                                                      // reset tuple separator to ", "
    127138        sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\"" | endl;
    128 
    129139        sout | t1 | t2 | endl;                                                          // print tuple
     140        sout | endl;
    130141
    131142        [int, int, const char *, double] t3 = { 3, 4, "a", 7.2 };
Note: See TracChangeset for help on using the changeset viewer.