Changeset 33


Ignore:
Timestamp:
12/27/05 13:44:23 (8 years ago)
Author:
xi
Message:

Add test for bug #33.
Add test for the bug with emitting extra delimiters.

Location:
trunk/sandbox/emit-it
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sandbox/emit-it/Makefile

    r25 r33  
    11 
    2 ALL = emit-it complex-key-bug trailing-space-bug 
     2ALL = emit-it complex-key-bug trailing-space-bug extra-delimiter-bug 
    33 
    44.PHONY: default clean 
  • trunk/sandbox/emit-it/trailing-space-bug.c

    r25 r33  
    55#include <syck.h> 
    66 
    7 #define VALUE "this scalar contains traling spaces   " 
     7#define VALUE1 "this scalar contains trailing spaces  " 
     8#define VALUE2 "this scalar contains a trailing colon:" 
    89 
    910void output_handler(SyckEmitter *e, char *str, long len) 
     
    1617    switch (id) { 
    1718        case 1: 
    18             syck_emit_scalar(e, "tag:yaml.org,2002:str", scalar_none, 0, 0, 0, VALUE, strlen(VALUE)); 
     19            syck_emit_seq(e, NULL, seq_none); 
     20            syck_emit_item(e, 2); 
     21            syck_emit_item(e, 3); 
     22            syck_emit_end(e); 
     23            break; 
     24        case 2: 
     25            syck_emit_scalar(e, "tag:yaml.org,2002:str", scalar_none, 0, 0, 0, VALUE1, strlen(VALUE1)); 
     26            break; 
     27        case 3: 
     28            syck_emit_scalar(e, "tag:yaml.org,2002:str", scalar_none, 0, 0, 0, VALUE2, strlen(VALUE2)); 
    1929            break; 
    2030    } 
     
    3040    syck_output_handler(e, output_handler); 
    3141    syck_emitter_mark_node(e, 1); 
     42    syck_emitter_mark_node(e, 2); 
     43    syck_emitter_mark_node(e, 3); 
    3244    syck_emit(e, 1); 
    3345    syck_emitter_flush(e, 0); 
Note: See TracChangeset for help on using the changeset viewer.