Running 'mpost.R' [3s]
  Running 'path.R' [151s]
Running the tests in 'tests/path.R' failed.
Complete output:
  > 
  > library(metapost)
  
  Attaching package: 'metapost'
  
  The following object is masked from 'package:stats':
  
      cycle
  
  The following object is masked from 'package:base':
  
      dir
  
  > 
  > ## Errors
  > ## Both direction and curl specified
  > try(knot(0, 0, dir.left=0, curl.left=1))
  Error in knot(0, 0, dir.left = 0, curl.left = 1) : 
    Invalid to specify both dir and curl at once
  > ## Both tension and control point specified
  > try(knot(0, 0, cp.left.x=1, cp.left.y=1, tension.left=1))
  Error in knot(0, 0, cp.left.x = 1, cp.left.y = 1, tension.left = 1) : 
    Invalid to specify both control point and tension at once
  > 
  > ## Printing
  > knot(0, 0) 
  (0in,0in)
  > knot(0, 0, dir=0) 
  {dir 0}(0in,0in){dir 0}
  > knot(0, 0, dir.left=0) 
  {dir 0}(0in,0in)
  > knot(0, 0, dir.left=0, dir.right=90) 
  {dir 0}(0in,0in){dir 90}
  > knot(0, 0, dir.right=90) 
  (0in,0in){dir 90}
  > knot(1:10, 0)
  (0.01in,0in)
  (0.03in,0in)
  (0.04in,0in)
  (0.06in,0in)
  (0.07in,0in)
  (0.08in,0in)
  (0.1in,0in)
  (0.11in,0in)
  (0.12in,0in)
  (0.14in,0in)
  > knot(1:10, 0, dir.left=0)
  {dir 0}(0.01in,0in)
  {dir 0}(0.03in,0in)
  {dir 0}(0.04in,0in)
  {dir 0}(0.06in,0in)
  {dir 0}(0.07in,0in)
  {dir 0}(0.08in,0in)
  {dir 0}(0.1in,0in)
  {dir 0}(0.11in,0in)
  {dir 0}(0.12in,0in)
  {dir 0}(0.14in,0in)
  > knot(1:10, 0, dir.left=1:10)
  {dir 1}(0.01in,0in)
  {dir 2}(0.03in,0in)
  {dir 3}(0.04in,0in)
  {dir 4}(0.06in,0in)
  {dir 5}(0.07in,0in)
  {dir 6}(0.08in,0in)
  {dir 7}(0.1in,0in)
  {dir 8}(0.11in,0in)
  {dir 9}(0.12in,0in)
  {dir 10}(0.14in,0in)
  > knot(1:2, 0, dir.left=c(1, NA), curl.left=c(NA, 1))
  {dir 1}(0.01in,0in)
  {curl 1}(0.03in,0in)
  > knot(0, 0, curl.left=1) 
  {curl 1}(0in,0in)
  > knot(0, 0, curl.right=1) 
  (0in,0in){curl 1}
  > knot(0, 0, curl.left=1, curl.right=1) 
  {curl 1}(0in,0in){curl 1}
  > print(knot(0, 0, curl.left=1, curl.right=1), first=TRUE) 
  (0in,0in){curl 1}
  > 
  > ## Building paths
  > knot(0, 0) + knot(1, 1)
  (0in,0in)..(0.01in,0.01in)
  > ## Only one explicit control point
  > knot(0, 0, cp.right.x=1, cp.right.y=1) + knot(1, 1)
  (0in,0in)..controls (0.01in,0.01in)..(0.01in,0.01in)
  > ## Two explicit control points
  > knot(0, 0, cp.right.x=1, cp.right.y=1) + knot(3, 0, cp.left.x=2, cp.left.y=1)
  (0in,0in)..controls (0.01in,0.01in) and (0.03in,0.01in)..(0.04in,0in)
  > ## Two tensions
  > knot(0, 0, tension.right=1) + knot(1, 1, tension.left=-4)
  (0in,0in)..tension 1 and atleast 4..(0.01in,0.01in)
  > ## Only one tension
  > knot(0, 0) + knot(1, 1, tension.left=-4)
  (0in,0in)..tension atleast 4..(0.01in,0.01in)
  > ## Specifying control points, tension, and direction separately from knots
  > knot(0, 0) + tension(-4) + knot(1, 1)
  (0in,0in)..tension atleast 4 and atleast 4..(0.01in,0.01in)
  > ## Vectorised knot
  > knot(1:3, 0) + tension(-4) + knot(1, 1)
  (0.01in,0in)..tension atleast 4 and atleast 4..(0.01in,0.01in)
  (0.03in,0in)..tension atleast 4 and atleast 4..(0.01in,0.01in)
  (0.04in,0in)..tension atleast 4 and atleast 4..(0.01in,0.01in)
  > ## Different operators
  > knot(0, 0) - knot(1, 1)
  (0in,0in){curl 1}..{curl 1}(0.01in,0.01in)
  > knot(0, 0) %+% knot(1, 1)
  (0in,0in)..tension atleast 1 and atleast 1..(0.01in,0.01in)
  > knot(0, 0) %-% knot(1, 1)
  (0in,0in)..tension infinity and infinity..(0.01in,0.01in)
  > ## More than two knots
  > knot(0, 0) + knot(1, 1) + knot(2, 2)
  (0in,0in)..(0.01in,0.01in)..(0.03in,0.03in)
  > knot(0, 0) + knot(1, 1) + knot(2, 2) + knot(3, 3)
  (0in,0in)..(0.01in,0.01in)..(0.03in,0.03in)..(0.04in,0.04in)
  > ## Cycle
  > knot(0, 0) + knot(1, 1) + cycle()
  (0in,0in)..(0.01in,0.01in)..cycle
  > ##   vectorised connector 
  > knot(0, 0) + dir(1, 0) + knot(1, 1)
  (0in,0in){dir 0}..(0.01in,0.01in)
  > knot(0, 0) + dir(10) + knot(1, 1)
  (0in,0in){dir 10}..(0.01in,0.01in)
  > knot(0, 0) + dir(1:4*10) + knot(1, 1)
  (0in,0in){dir 10}..(0.01in,0.01in)
  (0in,0in){dir 20}..(0.01in,0.01in)
  (0in,0in){dir 30}..(0.01in,0.01in)
  (0in,0in){dir 40}..(0.01in,0.01in)
  > ## Add path to path
  > p1 <- knot(0, 0) + knot(1, 1)
  > p2 <- knot(2, 2) + knot(3, 3)
  > p1 + p2
  (0in,0in)..(0.01in,0.01in)..(0.03in,0.03in)..(0.04in,0.04in)
  > 
  > ## MetaPost examples 
  > ## p := (0,0)..(10,10)..(10,-5)..cycle;
  > knot(0, 0) + knot(10, 10) + knot(10, -5) + cycle()
  (0in,0in)..(0.14in,0.14in)..(0.14in,-0.07in)..cycle
  > ## p := (0,0)..
  > ##      (2,20)--
  > ##      (10, 5)..controls (2,2) and (9,4.5)..
  > ##      (3,10)..tension 3 and atleast 4 ..
  > ##      (1,14){2,0} .. {0,1}(5,-4);
  > knot(0, 0) +
  +     knot(2, 20) -
  +     knot(10, 5) + cp(2, 2) + cp(9, 4.5) +
  +     knot(3, 10) + tension(3) + tension(-4) +
  +     knot(1, 14) + dir(2, 0) + dir(0, 1) +
  +     knot(5, -4)
  (0in,0in)..(0.03in,0.28in){curl 1}..{curl 1}(0.14in,0.07in)..controls (0.03in,0.03in) and (0.12in,0.06in)..(0.04in,0.14in)..tension 3 and atleast 4..(0.01in,0.19in){dir 0}..{dir 90}(0.07in,-0.06in)
  > 
  > proc.time()
     user  system elapsed 
     0.28    0.10    0.37