Skip to content

Commit

Permalink
Add test, update docs and changelog
Browse files Browse the repository at this point in the history
Fixes #23
  • Loading branch information
psibi committed Aug 2, 2024
1 parent 911dc76 commit 0c91b93
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.org
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@
- ~rustic-recompile~ will remember any universal arguments that is
passed to it.
- Fix ~rustic-cargo-upgrade~ in the presence of universal arguments.
- Fix ~rusti-cargo-clippy-rerun~ to use the last used arguments.
- Fix ~rustic-cargo-clippy-rerun~ to use the last used arguments.
- Implement ~rustic-babel-display-error-popup~ customization
option. Refer the variable docs for more details.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ Customization:
of babel process
- `rustic-babel-auto-wrap-main` wrap body into main function
- `rustic-babel-default-toolchain` active toolchain for babel blocks
- `rustic-babel-display-error-popup` displays error popup on
compilation failure or when the exit code is non zero. Set it to nil
if you want it to be displayed as part of result block.

### lsp-mode

Expand Down
10 changes: 10 additions & 0 deletions test/rustic-babel-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@
(should (eq (rustic-test-babel-check-results buf) nil))
(should-not (buffer-live-p rustic-babel-compilation-buffer-name))))

(ert-deftest rustic-test-babel-error-no-popup ()
(let* ((string "fn main() {
panic(\"hello world\");
}")
(buf (rustic-test-get-babel-block string))
(rustic-babel-display-error-popup t)
)
(rustic-test-babel-execute-block buf)
(should (s-contains? "hello world" (rustic-test-babel-check-results buf)))))

(ert-deftest rustic-test-babel-error-results ()
(let* ((string "fn main() {
let v = vec![1, 2, 3];
Expand Down

0 comments on commit 0c91b93

Please sign in to comment.