Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update changelog, add test and bump version #22

Merged
merged 1 commit into from
Jul 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog.org
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* 0.9

- Handle carriage return properly on the compilation buffer.

* 0.8

- Define a compilation mode named ~justl-compile-mode~. Executing
Expand Down
2 changes: 1 addition & 1 deletion justl.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
;; USA

;; Version: 0.8
;; Version: 0.9
;; Author: Sibi Prabakaran
;; Keywords: just justfile tools processes
;; URL: https://github.com/psibi/justl.el
Expand Down
7 changes: 6 additions & 1 deletion test/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ carriage-return:
printf "1/3\r"
printf "2/3\r"
printf "3/3\r"
printf "DONE\n"
printf "DONE\n"

# A target that will print colors
color:
#!/usr/bin/env bash
printf "\x1B[31mThis is red text\n"
16 changes: 15 additions & 1 deletion test/justl-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

(ert-deftest justl--get-recipies-test ()
(should (equal
(list "default" "build-cmd" "plan" "push" "push2" "fail" "carriage-return")
(list "default" "build-cmd" "plan" "push" "push2" "fail" "carriage-return"
"color")
(justl--get-recipies))))

(ert-deftest justl--list-to-recipe-test ()
Expand Down Expand Up @@ -225,6 +226,19 @@
(kill-buffer (justl--buffer-name))
(kill-buffer justl--output-process-buffer))

(ert-deftest justl--execute-recipe-with-color ()
"A target printing color is handled properly."
(justl)
(with-current-buffer (justl--buffer-name)
(search-forward "color")
(justl-exec-recipe)
(justl--wait-till-exit justl--output-process-buffer))
(with-current-buffer justl--output-process-buffer
(let ((buf-string (buffer-substring-no-properties (point-min) (point-max))))
(should (s-contains? "This is red text\n" buf-string))))
(kill-buffer (justl--buffer-name))
(kill-buffer justl--output-process-buffer))

;; (ert "justl--**")

(provide 'justl-test)
Expand Down