emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] org-babel-goto-named-src-block bugfix and test


From: Nicolas Goaziou
Subject: Re: [O] [PATCH] org-babel-goto-named-src-block bugfix and test
Date: Tue, 14 Jun 2016 13:46:03 +0200

Hello,

Marco Wahl <address@hidden> writes:

> I have no idea for a cleaner implementation of these tests.  AFAICS
> these tests look good (and also your code.)  If someone has a better
> idea for the tests they can be changed.

I don't.

> I would drop test
>
> #v+
> ;; non-existent name
> (should-not
>   (execute-kbd-macro
> "\M-xorg-babel-goto-named-src-block\ndef\n"))
> #v-
>
> because its outcome has nothing to do with the existence of the name
> "def" AFAICS.  Or maybe replace with
>
> (should (string= "source-code block `non-existent' not found in this buffer"
> (org-babel-goto-named-src-block "non-existent")))
>
> +1 for commit!

I'm not very keen on having `should' macro in the inner parts of tests,
because it makes debugging failing tests harder, but a test is better
than nothing. So, all in all, it looks good enough to be pushed.

Thank you !


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]