arith.right 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. other bases
  74. 10 10
  75. 10 10
  76. 10 10
  77. 10 10
  78. 10 10
  79. 10 10
  80. 36 36
  81. 36 36
  82. 62 62
  83. 63 63
  84. missing number after base
  85. 0 0
  86. hush: arithmetic syntax error
  87. hush: divide by zero
  88. hush: can't execute 'let': No such file or directory
  89. hush: arithmetic syntax error
  90. hush: can't execute 'let': No such file or directory
  91. abc
  92. def
  93. ghi
  94. hush: arithmetic syntax error
  95. 16 16
  96. hush: arithmetic syntax error
  97. hush: malformed ?: operator
  98. hush: arithmetic syntax error
  99. 9 9
  100. hush: arithmetic syntax error
  101. hush: arithmetic syntax error
  102. 9 9
  103. 9 9
  104. 9 9
  105. 7 7
  106. 7
  107. 4 4
  108. 32767 32767
  109. 32768 32768
  110. 131072 131072
  111. 2147483647 2147483647
  112. 1 1
  113. 4 4
  114. 4 4
  115. 5 5
  116. 5 5
  117. 4 4
  118. 3 3
  119. 3 3
  120. 4 4
  121. 4 4
  122. 7 7
  123. hush: arithmetic syntax error
  124. hush: arithmetic syntax error
  125. hush: arithmetic syntax error
  126. hush: arithmetic syntax error
  127. hush: arithmetic syntax error
  128. 4 4
  129. 7 7
  130. -7 -7
  131. 7
  132. 7
  133. hush: arithmetic syntax error
  134. hush: arithmetic syntax error
  135. hush: arithmetic syntax error
  136. hush: arithmetic syntax error
  137. 6 6
  138. 3 3
  139. 7 7
  140. 4 4
  141. 0 0
  142. 3 3
  143. 7 7
  144. 2 2
  145. -2 -2
  146. 1 1
  147. 7
  148. 7
  149. 7
  150. 7
  151. 7
  152. 7
  153. 5 5
  154. 1 1
  155. 6 6
  156. 2 2
  157. 3 3
  158. 1 1
  159. 4 4
  160. 0 0
  161. -7
  162. -7
  163. 7
  164. 7
  165. -7 -7
  166. -7 -7
  167. 7 7
  168. 7 7
  169. 8 12
  170. hush: arithmetic syntax error
  171. 42
  172. 42
  173. 42
  174. hush: can't execute 'a[b[c]d]=e': No such file or directory