expr-works 775 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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;