1. Let's call the file a part of Emacs (we plan to move tests to Emacs eventually)
For this I would need some additional support as I don't exactly understand what you mean here. Do you mean where to put it as in like "emacs/test/lisp" instead of "org-mode/testing/lisp"?
2. Please prefix the macro and function names (with-...)
Done.
3. [...] (unwind-protect ...) to make sure that we can recover from
errors
Thanks for the hint! Done.
4. I strongly suggest against using `org-test-at-id'
Replaced it with "inline" code blocks using `org-test-with-temp-text'.
5. prologue/epilogue are not test-covered
Now they are.
6. Do you really need `test-ob-csharp/default-compile-command-created'?
Absolutely not. Same goes for ../default-restore-command... -> removed both.
Please avoid using ' marks. Prefer "
I updated the respective docstrings.
9.8 is the future version
I bumped the version number.Additionally, there are now tests for the `org-babel-csharp-additional-project-flags` setting as well.
On 14.04.25 20:23, Ihor Radchenko wrote:
poverobuosodonati <[email protected]> writes:Next step will be writing tests.The project now contains the file test-ob-csharp.el [1] along with a test org-file ob-csharp-test.org [2]. I tried to follow the examples of the test files under /testing/lisp/ and /testing/examples /of the org-mode repository.Some comments: 1. Let's call the file a part of Emacs (we plan to move tests to Emacs eventually) 2. Please prefix the macro and function names (with-...) to avoid polluting global namespace. 3. When you need to set variable back after the test is running, please do it via (unwind-protect ...) to make sure that we can recover from errors 4. I strongly suggest against using `org-test-at-id'. Such tests are hard to rid because you need to go back and forth. Most of the test can be written using `org-test-with-temp-text' and do not require a permanent Org file. 5. prologue/epilogue are not test-covered 6. Do you really need `test-ob-csharp/default-compile-command-created'? That's a trivial function. Other comments:(defun org-babel--csharp-format-refs (refs) "Format REFS into a string suitable for inclusion in a .csproj file. REFS should be a list of strings or cons cells, each representing a reference. If an entry is a cons cell, the car is the reference name and the cdr is the version. Returns a formatted string representing the references, categorized into project reference, assembly reference, and package reference. Reference types are distinguished by their file extension. '.csproj' is interpreted as a project reference, '.dll' as an assembly reference. When a version is present, it will be treated as a package reference."Please avoid using ' marks. Prefer "...". ' are special and should be additionally escaped.:package-version '(Org. "9.7")9.8 is the future version where we include new features.
