frame_ref 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. #!/bin/sh
  2. . ./Common
  3. ###############################################################################
  4. fped_dump "frame reference: \"frame\" (origin)" <<EOF
  5. frame f {}
  6. frame f @
  7. EOF
  8. expect <<EOF
  9. /* MACHINE-GENERATED ! */
  10. frame f {
  11. }
  12. package "_"
  13. unit mm
  14. frame f @
  15. EOF
  16. #------------------------------------------------------------------------------
  17. fped_dump "frame reference: \"%frame\" (current frame origin)" <<EOF
  18. frame f {}
  19. %frame f @
  20. EOF
  21. expect <<EOF
  22. /* MACHINE-GENERATED ! */
  23. frame f {
  24. }
  25. package "_"
  26. unit mm
  27. frame f @
  28. EOF
  29. #------------------------------------------------------------------------------
  30. fped_dump "frame reference: \"%frame\" (current frame vector)" <<EOF
  31. frame f {}
  32. v: vec @(0mm, 0mm)
  33. %frame f v
  34. EOF
  35. expect <<EOF
  36. /* MACHINE-GENERATED ! */
  37. frame f {
  38. }
  39. package "_"
  40. unit mm
  41. v: vec @(0mm, 0mm)
  42. frame f .
  43. EOF
  44. #------------------------------------------------------------------------------
  45. fped_dump "frame reference: \"%frame\" (other frame origin)" <<EOF
  46. frame f {}
  47. frame g {}
  48. %frame f g.@
  49. EOF
  50. expect <<EOF
  51. /* MACHINE-GENERATED ! */
  52. frame f {
  53. }
  54. frame g {
  55. frame f @
  56. }
  57. package "_"
  58. unit mm
  59. EOF
  60. #------------------------------------------------------------------------------
  61. fped_dump "frame reference: \"%frame\" (other frame base)" <<EOF
  62. frame f {}
  63. frame g {
  64. v: vec @(0mm, 0mm)
  65. }
  66. %frame f g.v
  67. EOF
  68. expect <<EOF
  69. /* MACHINE-GENERATED ! */
  70. frame f {
  71. }
  72. frame g {
  73. v: vec @(0mm, 0mm)
  74. frame f .
  75. }
  76. package "_"
  77. unit mm
  78. EOF
  79. #------------------------------------------------------------------------------
  80. fped_fail "frame reference: \"%frame\" (cycle)" <<EOF
  81. frame f {
  82. }
  83. frame g {
  84. frame f @
  85. }
  86. %frame g f.@
  87. EOF
  88. expect <<EOF
  89. 8: frame "g" is a parent of "f" near "@"
  90. EOF
  91. #------------------------------------------------------------------------------
  92. fped_dump "frame reference: \"%frame\" (out-of-order)" <<EOF
  93. frame f {
  94. }
  95. frame g {
  96. }
  97. %frame g f.@
  98. EOF
  99. expect <<EOF
  100. /* MACHINE-GENERATED ! */
  101. frame g {
  102. }
  103. frame f {
  104. frame g @
  105. }
  106. package "_"
  107. unit mm
  108. EOF
  109. ###############################################################################