Skip to content

Commit

Permalink
add debugging for test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
razzmatazz committed Apr 7, 2019
1 parent ff23c5c commit ef2f7e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions test/buttercup-tests/setup.el
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ request id."
(beginning-of-buffer)
(search-forward "$")
(delete-backward-char 1)
(message (concat "ot--buffer-contents-and-point-at-$: (thing-at-point 'word) is"
(thing-at-point 'word)))
;; will block
(omnisharp--update-buffer)
(when (fboundp 'evil-insert)
Expand Down
16 changes: 10 additions & 6 deletions test/buttercup-tests/solution/code-actions/fix-code-issue-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
;; Test a few different kinds of code actions to see we can support
;; each one in a sensible manner.
(describe "Fix code issue"
(before-each (ot--open-the-minimal-project-source-file "MyClass.cs"))
(before-each (ot--open-the-minimal-project-source-file "MyClass1.cs"))
(it "can act on a simple part of the buffer (using System;)"
(ot--buffer-contents-and-point-at-$
"public class Class1"
"{"
" public void Whatever()"
"namespace MyNamespace {"
" public class Class1"
" {"
" Gu$id.NewGuid();"
" public void Whatever()"
" {"
" Gu$id.NewGuid();"
" }"
" }"
"}")
(ot--answer-omnisharp--completing-read-with (lambda (choices) "using System;"))
(ot--answer-omnisharp--completing-read-with (lambda (choices)
(message (concat "the choices are: " (json-encode choices)))
"using System;"))
(omnisharp--wait-until-request-completed (omnisharp-run-code-action-refactoring))
(ot--buffer-should-contain "using System;"))

Expand Down

0 comments on commit ef2f7e1

Please sign in to comment.