3
0

expr-works 776 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # busybox expr
  2. busybox expr 1 \| 1
  3. busybox expr 1 \| 0
  4. busybox expr 0 \| 1
  5. busybox expr 1 \& 1
  6. busybox expr 0 \< 1
  7. busybox expr 1 \> 0
  8. busybox expr 0 \<= 1
  9. busybox expr 1 \<= 1
  10. busybox expr 1 \>= 0
  11. busybox expr 1 \>= 1
  12. busybox expr 1 + 2
  13. busybox expr 2 - 1
  14. busybox expr 2 \* 3
  15. busybox expr 12 / 2
  16. busybox expr 12 % 5
  17. set +e
  18. busybox expr 0 \| 0
  19. if [ $? != 1 ] ; then
  20. exit 1;
  21. fi;
  22. busybox expr 1 \& 0
  23. if [ $? != 1 ] ; then
  24. exit 1;
  25. fi;
  26. busybox expr 0 \& 1
  27. if [ $? != 1 ] ; then
  28. exit 1;
  29. fi;
  30. busybox expr 0 \& 0
  31. if [ $? != 1 ] ; then
  32. exit 1;
  33. fi;
  34. busybox expr 1 \< 0
  35. if [ $? != 1 ] ; then
  36. exit 1;
  37. fi;
  38. busybox expr 0 \> 1
  39. if [ $? != 1 ] ; then
  40. exit 1;
  41. fi;
  42. busybox expr 1 \<= 0
  43. if [ $? != 1 ] ; then
  44. exit 1;
  45. fi;
  46. busybox expr 0 \>= 1
  47. if [ $? != 1 ] ; then
  48. exit 1;
  49. fi;