expand-works-like-GNU 440 B

1234567891011121314151617181920
  1. # FEATURE: CONFIG_UNEXPAND
  2. rm -f foo bar
  3. $ECHO -e "\ty" | expand -t 3 ../../busybox > foo
  4. $ECHO -e "\ty" | busybox unexpand -t 3 ../../busybox > bar
  5. set +e
  6. test ! -f foo -a -f bar
  7. if [ $? = 0 ] ; then
  8. set -e
  9. diff -q foo bar
  10. fi
  11. rm -f foo bar
  12. $ECHO -e "\ty\tx" | expand -it 3 ../../busybox > foo
  13. $ECHO -e "\ty\tx" | busybox unexpand -it 3 ../../busybox > bar
  14. set +e
  15. test ! -f foo -a -f bar
  16. if [ $? = 0 ] ; then
  17. set -e
  18. diff -q foo bar
  19. fi