Skip to content

Commit

Permalink
rust-dbg-wrap-or-unwrap: Test final cursor position in existing wrap …
Browse files Browse the repository at this point in the history
…tests
  • Loading branch information
micl2e2 authored and Michael Lee committed Aug 3, 2023
1 parent 3816d2e commit 1cc297d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rust-mode-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -3454,7 +3454,8 @@ impl Two<'a> {
"let x = add(first, second);"
15
#'rust-dbg-wrap-or-unwrap
"let x = add(dbg!(first), second);"))
"let x = add(dbg!(first), second);"
24))

(ert-deftest rust-test-dbg-wrap-empty-line ()
(rust-test-manip-code
Expand Down Expand Up @@ -3494,7 +3495,8 @@ let b = 1;"
"let x = add((first, second);"
14
#'rust-dbg-wrap-or-unwrap
"let x = add((dbg!(first), second);"))
"let x = add((dbg!(first), second);"
25))

(ert-deftest rust-test-dbg-wrap-region ()
(rust-test-manip-code
Expand All @@ -3505,7 +3507,8 @@ let b = 1;"
(push-mark nil t t)
(goto-char 26)
(rust-dbg-wrap-or-unwrap))
"let x = dbg!(add(first, second));"))
"let x = dbg!(add(first, second));"
33))

(defun rust-test-dbg-unwrap (position)
(rust-test-manip-code
Expand Down

0 comments on commit 1cc297d

Please sign in to comment.