del_frame 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #!/bin/sh
  2. . ./Common
  3. ###############################################################################
  4. fped_fail "delete frame: can't self-destruct" <<EOF
  5. frame f {
  6. %del f
  7. }
  8. EOF
  9. expect <<EOF
  10. 3: a frame can't delete itself near "}"
  11. EOF
  12. #------------------------------------------------------------------------------
  13. fped_dump "delete frame: content disappears" <<EOF
  14. frame f {
  15. vec @(0mm, 0mm)
  16. }
  17. %del f
  18. EOF
  19. expect <<EOF
  20. /* MACHINE-GENERATED ! */
  21. package "_"
  22. unit mm
  23. EOF
  24. #------------------------------------------------------------------------------
  25. fped_dump "delete frame: references disappear" <<EOF
  26. frame f {
  27. vec @(0mm, 0mm)
  28. }
  29. frame f @
  30. %del f
  31. EOF
  32. expect <<EOF
  33. /* MACHINE-GENERATED ! */
  34. package "_"
  35. unit mm
  36. EOF
  37. #------------------------------------------------------------------------------
  38. fped_dump "delete frame: measurements disappear" <<EOF
  39. frame f {
  40. v: vec @(0mm, 0mm)
  41. }
  42. frame f @
  43. meas f.v -> f.v
  44. %del f
  45. EOF
  46. expect <<EOF
  47. /* MACHINE-GENERATED ! */
  48. package "_"
  49. unit mm
  50. EOF
  51. #------------------------------------------------------------------------------
  52. fped_dump "delete frame: measurements with qualifiers disappear" <<EOF
  53. frame f {
  54. v: vec @(0mm, 0mm)
  55. }
  56. frame g { frame f @ }
  57. frame g @
  58. meas g/f.v -> f.v
  59. %del g
  60. EOF
  61. expect <<EOF
  62. /* MACHINE-GENERATED ! */
  63. frame f {
  64. v: vec @(0mm, 0mm)
  65. }
  66. package "_"
  67. unit mm
  68. EOF
  69. ###############################################################################