*** empty log message ***
[m17n/m17n-lib-cs.git] / textprop.cs
1 using System;
2 using System.Collections.Generic;
3 using M17N;
4 using M17N.Core;
5
6 public class Test
7 {
8   public static void Main ()
9   {
10     String str = "0123456789";
11     MText mt = new MText (str);
12     MSymbol sym = new MSymbol ("key");
13     MTextProperty prop1 = new MTextProperty (sym, "val0");
14     MTextProperty prop2 = new MTextProperty (sym, "val1");
15
16     M17N.M17N.debug = true;
17
18     mt.PushProp (1, 3, prop1);
19     mt.PushProp (0, 1, prop1);
20     mt.PushProp (0, 1, prop2);
21     mt.PushProp (3, 5, prop1);
22     mt.PushProp (3, 5, prop2);
23     mt.PushProp (7, 8, prop2);
24     mt.PushProp (5, 7, prop2);
25     mt.PushProp (5, 7, prop1);
26     mt.PushProp (8, 10, prop1);
27     mt.PopProp (8, 9, sym);
28     mt.DumpPropNested ();
29     mt.PopProp (5, 9, sym);
30     mt.DumpPropNested ();
31
32     mt = new MText (str);
33     mt.PushProp (2, 5, prop1);
34     mt.DumpProp ();
35     mt.PushProp (3, 6, prop2);
36     mt.DumpProp ();
37     mt.Del (4, 9);
38     mt.DumpProp ();
39     mt.Ins (5, new MText ("45678"));
40     mt.DumpProp ();
41     mt.Dup ().DumpProp ();
42     mt.PopProp (0, 3, sym);
43     mt.DumpProp ();
44     mt.PopProp (2, 8, sym);
45     mt.DumpProp ();
46   }
47 }