arith.right 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. Format: 'expected actual'
  2. 163 163
  3. 4 4
  4. 16 16
  5. 8 8
  6. 2 2
  7. 4 4
  8. 2 2
  9. 2 2
  10. 1 1
  11. 0 0
  12. 0 0
  13. 0 0
  14. 1 1
  15. 1 1
  16. 2 2
  17. -3 -3
  18. -2 -2
  19. 1 1
  20. 0 0
  21. 2 2
  22. 131072 131072
  23. 29 29
  24. 33 33
  25. 49 49
  26. 1 1
  27. 1 1
  28. 0 0
  29. 0 0
  30. 1 1
  31. 1 1
  32. 1 1
  33. 2 2
  34. 3 3
  35. 1 1
  36. 58 58
  37. 2 2
  38. 60 60
  39. 1 1
  40. 256 256
  41. 16 16
  42. 62 62
  43. 4 4
  44. 29 29
  45. 5 5
  46. unary plus, minus
  47. -4 -4
  48. 4 4
  49. conditional expressions
  50. 1 1
  51. 32 32
  52. 32 32
  53. 1 1
  54. 1 1
  55. 32 32
  56. check that parentheses in `cmd` are interpreted correctly
  57. 3 3
  58. check that the unevaluated part of the ternary operator does not do evaluation or assignment
  59. 20 20
  60. 30 30
  61. 20 20
  62. 30 30
  63. check precedence of assignment vs. conditional operator
  64. hush: arithmetic syntax error
  65. check precedence of assignment vs. conditional operator
  66. associativity of assignment-operator operator
  67. 6 6
  68. 6,5,3 6,5,3
  69. octal, hex
  70. 263 263
  71. 255 255
  72. 40 40
  73. hush: arithmetic syntax error
  74. hush: divide by zero
  75. hush: can't execute 'let': No such file or directory
  76. hush: arithmetic syntax error
  77. hush: can't execute 'let': No such file or directory
  78. abc
  79. def
  80. ghi
  81. hush: arithmetic syntax error
  82. 16 16
  83. hush: arithmetic syntax error
  84. hush: malformed ?: operator
  85. hush: arithmetic syntax error
  86. 9 9
  87. hush: arithmetic syntax error
  88. hush: arithmetic syntax error
  89. 9 9
  90. 9 9
  91. 9 9
  92. 7 7
  93. 7
  94. 4 4
  95. 32767 32767
  96. 32768 32768
  97. 131072 131072
  98. 2147483647 2147483647
  99. 1 1
  100. 4 4
  101. 4 4
  102. 5 5
  103. 5 5
  104. 4 4
  105. 3 3
  106. 3 3
  107. 4 4
  108. 4 4
  109. hush: arithmetic syntax error
  110. hush: arithmetic syntax error
  111. hush: arithmetic syntax error
  112. hush: arithmetic syntax error
  113. hush: arithmetic syntax error
  114. 4 4
  115. 7 7
  116. -7 -7
  117. hush: arithmetic syntax error
  118. hush: arithmetic syntax error
  119. hush: arithmetic syntax error
  120. hush: arithmetic syntax error
  121. 6 6
  122. 3 3
  123. 7 7
  124. 4 4
  125. 0 0
  126. 3 3
  127. 7 7
  128. 2 2
  129. -2 -2
  130. 1 1
  131. hush: arithmetic syntax error
  132. hush: arithmetic syntax error
  133. hush: arithmetic syntax error
  134. hush: arithmetic syntax error
  135. hush: arithmetic syntax error
  136. 5 5
  137. 1 1
  138. 6 6
  139. 2 2
  140. 3 3
  141. 1 1
  142. 4 4
  143. 0 0
  144. hush: arithmetic syntax error
  145. hush: arithmetic syntax error
  146. 8 12
  147. hush: arithmetic syntax error
  148. 42
  149. 42
  150. 42
  151. hush: can't execute 'a[b[c]d]=e': No such file or directory