package svg

import (
  "log"
  "testing"
)

func TestPathSmall(t *testing.T) {
  log.SetFlags(0)

  raw := `m1 2 3 4L5,6 7,8z`
  cmds, err := Parse(raw)
  log.Println("ERR", err)
  log.Println("CMDS", cmds)
  //s.PrintSyntaxTree()
}

func TestPathLarge(t *testing.T) {
  log.SetFlags(0)

  cmds, err := Parse(testpath)
  log.Println("ERR", err)

  for _, cmd := range cmds {
    log.Println("CMD", cmd)
  }
  //s.PrintSyntaxTree()
}

var testpath = `m125.046143,49.428497l1.399597,15.470757l-4.19899,4.219284l1.399689,18.283569l0,5.62574l4.19899,7.032196l-1.399689,0l2.799393,9.845024l0,5.62574l-6.998383,-4.219368l-1.399612,28.128685l-1.399689,11.251282l-2.799408,16.877319l-1.399597,7.032288l1.399597,8.438171l-1.399597,5.626419l2.799301,5.625458l-2.799301,1.405853l-2.799393,14.06459l-1.399597,15.470474l-1.399704,16.877319l-2.799393,5.626419l-2.799286,8.438171l1.399689,8.438141l0,4.219574l0,5.625458l-4.199097,7.032288l-2.799286,7.032288l1.399689,7.032318l2.799301,7.032318l-11.197296,4.219543l-1.399689,1.405884l0,8.439117l0,8.438202l-4.199036,8.438171l-5.598679,12.658691l-1.399673,8.438171l6.998352,9.845032l2.799332,8.438171l-2.799332,11.251862l-1.399689,8.438171l0,7.032288l4.19902,12.657776l4.19899,8.439117l6.998398,2.812714l1.399597,1.40686l29.393173,1.405853l26.593658,0l34.991455,1.406891l47.589325,1.405853l68.583832,1.40686l124.57074,-1.40686l61.585358,-1.405853l50.387512,-2.812744l-6.998474,-160.334015l5.599426,-7.031311l-1.400146,-8.439133l2.799194,-9.845016l1.400146,-8.438171l-5.59845,-5.626419l-8.39856,-1.405869l-5.598389,-11.251877l1.399109,-9.845016l8.39856,-19.690033l9.797729,-21.095917c0,0 -8.398621,4.218597 -1.400146,-7.032288c6.998474,-11.251572 8.398621,-14.064484 11.197815,-29.535156c2.799194,-15.470757 6.998474,-21.096497 6.998474,-21.096497l0,-9.845016l-11.197815,-9.845024l-4.19928,-5.625725l-8.397583,-9.845024l-1.400085,-5.62574l-18.195251,1.406456l0,1.406464l-68.583862,1.406357l-33.592346,0l-9.797699,9.845024l-12.596863,-1.406357l-11.196808,2.81282l-12.597839,5.625725c0,0 -2.799225,1.406471 -8.397614,1.406471c-5.598389,0 -12.596893,2.812813 -12.596893,2.812813l-6.998505,7.032196l-11.197754,1.406364l-8.397614,-8.438553l-19.595367,12.657837l-13.996979,0l-2.799225,5.625732l-6.998474,-8.43856l-11.196777,-1.406448l-16.796204,-1.406372l-5.598389,5.625648l-5.599365,4.219368l-12.596893,1.406372l-15.396118,0l-12.596863,-2.812813l-5.599365,-5.625748l-1.399109,-9.845016l0,-8.43856l-4.19931,-14.064301l-5.598419,-7.0322l-12.597153,-7.03215l-5.598694,1.406441l-9.797684,-2.81287l-5.598694,-1.406429l-6.998291,4.219288l-5.598694,-1.406441l-12.596985,-2.812859z`
