Closed paaguti closed 2 years ago
BTW look at your variable names ;-)
which one(s)
@paaguti please resolve the conflicts.
Just woke up ...
Your code:
"INPUT-STRING processed by BODY forms in a temp buffer should equal
EXPECT-STRING."
(declare (indent 1) (debug t))
`(should (string= ,expect
(with-current-buffer-window "*ERT-should-temp-buffer*"
(erase-buffer)
(insert ,input)
(goto-char (point-min))
,@body
(buffer-string)))))
I fear should read:
(defmacro should-on-temp-buffer (input-string expect-string &rest body) "INPUT-STRING processed by BODY forms in a temp buffer should equal EXPECT-STRING." (declare (indent 1) (debug t)) `(should (string= ,expect-string (with-current-buffer-window "ERT-should-temp-buffer" (erase-buffer) (insert ,input-string) (goto-char (point-min)) @.*** (buffer-string)))))
right? Fixing these variable names allows me to pass the first move-text-down test.
Nest, /PA
On Thu, 8 Sept 2022 at 07:25, Jason Milkins @.***> wrote:
@paaguti https://github.com/paaguti please resolve the conflicts.
— Reply to this email directly, view it on GitHub https://github.com/emacsfodder/move-text/pull/22#issuecomment-1240235807, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4BYGV3S5YQVH7EJLWTV5F2EHANCNFSM6AAAAAAQG4YCJU . You are receiving this because you were mentioned.Message ID: @.***>
-- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler
Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet
Oof...my eyes! rofl please format the code, or better still, comment on the "Files changed" tab at the line(s) relevant.
Oops, right, that isn't the nicest way of showing code, sorry :-)
Oof...my eyes! 🤣 please format the code, or better still, comment on the "Files changed" tab at the line(s) relevant.
FYI from email I think 4 leading space text is formatted as code... let me check
This is a quick test of code formatting from email....
(defun mark-range (start end)
"..."
(set-mark (min start end))
(goto-char (max start end))
(activate-mark)
(message "Select %d to %d" start end))
How did I do?!
Oh, well that sucks!
Anyway, it's always better to use the webapp, and then the diff view (Files changed) in the PR.
BTW, if you don't want to keep the test buffer, you can also use with-temp-buffer. Look at my test-framework branch. I just got the first test OK with call-interactively ;-)
On Thu, 8 Sept 2022 at 07:31, Pedro Andres Aranda Gutierrez < @.***> wrote:
Just woke up ...
Your code: (defmacro should-temp-buffer (input-string expect-string &rest body) "INPUT-STRING processed by BODY forms in a temp buffer should equal EXPECT-STRING." (declare (indent 1) (debug t)) `(should (string= ,expect (with-current-buffer-window "ERT-should-temp-buffer" (erase-buffer) (insert ,input) (goto-char (point-min)) @.*** (buffer-string)))))
I fear should read: (defmacro should-on-temp-buffer (input-string expect-string &rest body) "INPUT-STRING processed by BODY forms in a temp buffer should equal EXPECT-STRING." (declare (indent 1) (debug t)) `(should (string= ,expect-string (with-current-buffer-window "ERT-should-temp-buffer" (erase-buffer) (insert ,input-string) (goto-char (point-min)) @.*** (buffer-string))))) right? Fixing these variable names allows me to pass the first move-text-down test.
Nest, /PA
On Thu, 8 Sept 2022 at 07:25, Jason Milkins @.***> wrote:
@paaguti https://github.com/paaguti please resolve the conflicts.
— Reply to this email directly, view it on GitHub https://github.com/emacsfodder/move-text/pull/22#issuecomment-1240235807, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4BYGV3S5YQVH7EJLWTV5F2EHANCNFSM6AAAAAAQG4YCJU . You are receiving this because you were mentioned.Message ID: @.***>
-- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler
Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet
-- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler
Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet
Nope ;-)
good work, tidy up the remaining points and resolve the conflicts. I'll add a test runner when it's ready to merge.
I'm going to try to go back to the call-interactively
for the region tests in the next couple of days...
Ok check emacsfodder/test-box .github/workflows/
git pull --rebase
on upstream/test-framework before you do more work.
When this is green and the line and region tests are verified, we're good to merge.
Hi
This branch cannot be rebased due to conflicts
Did you know how to do this part?
Here's what happens next
That's all we need to do, running the tests after any change will happen automatically, but it's good practice to run them on the local dev machine to avoid turning the badge red here.
I approved the workflow run so hopefully we are seeing a green badge... now?
Green (Blue!) pass on the tests. 00:00am here so I'm out for the next 8hrs. Goodnight.
Looks like I can squash and merge.
Any additional tidying will happen in #23
BTW, if you don't want to keep the test buffer, you can also use with-temp-buffer. Look at my test-framework branch. I just got the first test OK with call-interactively ;-) On Thu, 8 Sept 2022 at 07:31, Pedro Andres Aranda Gutierrez < @.> wrote: … Just woke up ... Your code: (defmacro should-temp-buffer (input-string expect-string &rest body) "INPUT-STRING processed by BODY forms in a temp buffer should equal EXPECT-STRING." (declare (indent 1) (debug t)) `(should (string= ,expect (with-current-buffer-window "ERT-should-temp-buffer" (erase-buffer) (insert ,input) (goto-char (point-min)) @. (buffer-string))))) I fear should read: (defmacro should-on-temp-buffer (input-string expect-string &rest body) "INPUT-STRING processed by BODY forms in a temp buffer should equal EXPECT-STRING." (declare (indent 1) (debug t)) `(should (string= ,expect-string (with-current-buffer-window "ERT-should-temp-buffer" (erase-buffer) (insert ,input-string) (goto-char (point-min)) @. (buffer-string))))) right? Fixing these variable names allows me to pass the first move-text-down test. Nest, /PA On Thu, 8 Sept 2022 at 07:25, Jason Milkins @.> wrote: > @paaguti https://github.com/paaguti please resolve the conflicts. > > — > Reply to this email directly, view it on GitHub > <#22 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AAZKU4BYGV3S5YQVH7EJLWTV5F2EHANCNFSM6AAAAAAQG4YCJU > . > You are receiving this because you were mentioned.Message ID: > @.***> > -- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet -- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet
https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/ert-x.el ... is what we should've found the other day, these temp buffer, temp file styles have been done there.
Yup, that will be the next step for the test-framework. :-)
Right :-)
On Thu, 8 Sept 2022 at 09:53, Jason Milkins @.***> wrote:
@.**** commented on this pull request.
In move-text.el https://github.com/emacsfodder/move-text/pull/22#discussion_r965625160:
@@ -67,11 +67,15 @@ Note:
region-beginning' and
region-end' are the reason why anSo the predicate `region-active-p' is needed to avoid calling them when there's no region."
- `(,@(if (region-active-p)
- (list (region-beginning) (region-end))
- (list nil nil))
- ,current-prefix-arg))
- ;; `(,@(if (region-active-p)
- ;; (list (region-beginning) (region-end))
- ;; (list nil nil))
- ;; ,current-prefix-arg))
- (list
- (if mark-active (region-beginning) nil)
Better they learn that if is really an or/and combo.
— Reply to this email directly, view it on GitHub https://github.com/emacsfodder/move-text/pull/22#discussion_r965625160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4CRWMP62EMKLBWRKZLV5GLQ5ANCNFSM6AAAAAAQG4YCJU . You are receiving this because you were mentioned.Message ID: @.***>
-- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler
Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet
Using with-temp-buffer I can (at least) debug non-interactive functions... Hope that helps. BTW look at your variable names ;-)