Advertisement
2607

cat_test.sh

Dec 5th, 2021
1,062
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.49 KB | None | 0 0
  1. echo "---Cat tests---"
  2. echo "->common tests"
  3. ./s21_cat test.txt >1
  4. cat test.txt >2
  5. diff -s 1 2
  6. ./s21_cat -n test.txt >1
  7. cat -n test.txt >2
  8. diff -s 1 2
  9. ./s21_cat -n test.txt test_cat.c >1
  10. cat -n test.txt test_cat.c >2
  11. diff -s 1 2
  12. ./s21_cat -v test.txt >1
  13. cat -v test.txt >2
  14. diff -s 1 2
  15. ./s21_cat -t test.txt >1
  16. cat -t test.txt >2
  17. diff -s 1 2
  18. ./s21_cat -b test.txt >1
  19. cat -b test.txt >2
  20. diff -s 1 2
  21. ./s21_cat -e test.txt >1
  22. cat -e test.txt >2
  23. diff -s 1 2
  24. ./s21_cat -s test.txt >1
  25. cat -s test.txt >2
  26. diff -s 1 2
  27. ./s21_cat -z test.txt >1
  28. cat -z test.txt >2
  29. diff -s 1 2
  30. ./s21_cat -s test.txt1 test_cat.c >1
  31. cat -s test.txt1 test_cat.c >2
  32. diff -s 1 2
  33. echo "end->common"
  34. echo "->GNU tests" 
  35. ./s21_cat --number-nonblank test.txt >1
  36. cat --number-nonblank test.txt >2
  37. diff -s 1 2
  38. ./s21_cat --number test.txt >1
  39. cat --number test.txt >2
  40. diff -s 1 2
  41. ./s21_cat --squeeze-blank test.txt >1
  42. cat --squeeze-blank test.txt >2
  43. diff -s 1 2
  44. ./s21_cat -T test.txt >1
  45. cat -T test.txt >2
  46. diff -s 1 2
  47. ./s21_cat -E test.txt >1
  48. cat -E test.txt >2
  49. diff -s 1 2
  50. echo "end->GNU"
  51. echo "->bin tests" 
  52. ./s21_cat s21_cat >1
  53. cat s21_cat >2
  54. diff -s 1 2
  55. ./s21_cat -n s21_cat >1
  56. cat -n s21_cat >2
  57. diff -s 1 2
  58. ./s21_cat -v s21_cat >1
  59. cat -v s21_cat >2
  60. diff -s 1 2
  61. ./s21_cat -t s21_cat >1
  62. cat -t s21_cat >2
  63. diff -s 1 2
  64. ./s21_cat -b s21_cat >1
  65. cat -b s21_cat >2
  66. diff -s 1 2
  67. ./s21_cat -e s21_cat >1
  68. cat -e s21_cat >2
  69. diff -s 1 2
  70. ./s21_cat -s s21_cat >1
  71. cat -s s21_cat >2
  72. diff -s 1 2
  73. echo "end->bin"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement