insert-shebang-test.el 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ;;; insert-shebang-test.el --- Tests for insert-shebang.el
  2. (require 'ert)
  3. (require 'insert-shebang)
  4. (ert-deftest insert-shebang-env-path-test ()
  5. "Test insert-shebang `env' path."
  6. (should (equal insert-shebang-env-path "/usr/bin/env")))
  7. (ert-deftest insert-shebang-header-scan-limit-test ()
  8. "Test header scan limit."
  9. (should (equal insert-shebang-header-scan-limit 6)))
  10. (ert-deftest insert-shebang-eval-test ()
  11. "Test function insert-shebang-eval."
  12. (should (equal (insert-shebang-eval "bash") nil)))
  13. (ert-deftest insert-shebang-eval-scan-first-line ()
  14. "TODO insert-shebang-scan-first-line-eval (val)"
  15. (should (equal nil nil)))
  16. (ert-deftest insert-shebang-eval-scan-first-line-custom-header ()
  17. "TODO insert-shebang-scan-first-line-custom-header (val)"
  18. (should (equal nil nil)))
  19. (ert-deftest insert-shebang-eval-write-log-file ()
  20. "TODO insert-shebang-write-log-file (log-file-path log-file-list)"
  21. (should (equal nil nil)))
  22. (ert-deftest insert-shebang-eval-create-log-file ()
  23. "TODO insert-shebang-create-log-file (logfile)"
  24. (should (equal nil nil)))
  25. (ert-deftest insert-shebang-eval-log-ignored-files ()
  26. "TODO insert-shebang-log-ignored-files (filename)"
  27. (should (equal nil nil)))
  28. (ert-deftest insert-shebang-eval-log-ignored-files ()
  29. "TODO insert-shebang-open-log-buffer"
  30. (should (equal nil nil)))
  31. (ert-deftest insert-shebang-file-types-test ()
  32. "Function to test default file types."
  33. (should (equal (cdr (assoc "py" insert-shebang-file-types)) "python"))
  34. (should (equal (cdr (assoc "sh" insert-shebang-file-types)) "bash"))
  35. (should (equal (cdr (assoc "pl" insert-shebang-file-types)) "perl"))
  36. (should (equal (cdr (assoc "groovy" insert-shebang-file-types)) "groovy"))
  37. (should (equal (cdr (assoc "rb" insert-shebang-file-types)) "ruby"))
  38. (should (equal (cdr (assoc "lua" insert-shebang-file-types)) "lua"))
  39. (should (equal (cdr (assoc "fish" insert-shebang-file-types)) "fish"))
  40. (should (equal (cdr (assoc "php" insert-shebang-file-types)) "php"))
  41. (should (equal (cdr (assoc "robot" insert-shebang-file-types)) "robot")))