emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Rudolf Adamkovič" <salutis@me.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-java: Define the list of all supported header arguments
Date: Fri, 21 Oct 2022 14:58:41 +0200	[thread overview]
Message-ID: <m21qr1xri6.fsf@me.com> (raw)
In-Reply-To: <871qr17rjy.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

Ihor Radchenko <yantar92@posteo.net> writes:

> Thanks!
> Applied onto main.

Fantastic!

> Fixed.

Thanks.  Please see the attached patch with updated tests.

Rudy


[-- Attachment #2: 0001-test-ob-java-Test-Java-source-block-header-arguments.patch --]
[-- Type: text/x-patch, Size: 2708 bytes --]

From 5405d0419295bb1a0314cb2b3ce07713fc77e792 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Fri, 21 Oct 2022 14:48:56 +0200
Subject: [PATCH] test-ob-java: Test Java source block header arguments at all
 levels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* testing/lisp/test-ob-java.el (ob-java/lint-header-arguments):
Renamed to ob-java/lint-header-args-block.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-heading):
Test source block header arguments at the heading level.

* testing/lisp/test-ob-java.el (ob-java/lint-header-args-buffer):
Test source block header arguments at the buffer level.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2y1ta9rqe.fsf@me.com
---
 testing/lisp/test-ob-java.el | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/testing/lisp/test-ob-java.el b/testing/lisp/test-ob-java.el
index a62d66557..1cc7fbeb2 100644
--- a/testing/lisp/test-ob-java.el
+++ b/testing/lisp/test-ob-java.el
@@ -27,7 +27,36 @@
 
 ;;; No Java required
 
-(ert-deftest ob-java/lint-header-arguments ()
+(ert-deftest ob-java/lint-header-args-buffer ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the buffer level.
+  (org-test-with-temp-text "
+#+property: header-args:java+ :dir /tmp
+#+property: header-args:java+ :classname com.example.Example
+#+property: header-args:java+ :imports com.example.OtherExample
+#+property: header-args:java+ :cmpflag -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdline -classpath .:/tmp/example/
+#+property: header-args:java+ :cmdarg -verbose"
+    (should-not (org-lint '(wrong-header-argument)))))
+
+(ert-deftest ob-java/lint-header-args-heading ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the heading level.
+  (org-test-with-temp-text "
+* Test
+:PROPERTIES:
+:header-args:java+: :dir /tmp
+:header-args:java+: :classname com.example.Example
+:header-args:java+: :imports com.example.OtherExample
+:header-args:java+: :cmpflag -classpath .:/tmp/example/
+:header-args:java+: :cmdline -classpath .:/tmp/example/
+:header-args:java+: :cmdarg -verbose
+:END:"
+    (should-not (org-lint '(wrong-header-argument)))))
+
+(ert-deftest ob-java/lint-header-args-block ()
+  ;; Test that the Org linter accepts every supported Java source
+  ;; block header argument at the block level.
   (org-test-with-temp-text "
 #+header: :dir /tmp
 #+header: :classname com.example.Example
-- 
2.38.0


[-- Attachment #3: Type: text/plain, Size: 191 bytes --]

-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia

  reply	other threads:[~2022-10-21 13:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 20:15 [PATCH] ob-java: Define the list of all supported header arguments Rudolf Adamkovič
2022-10-21  4:02 ` Ihor Radchenko
2022-10-21 12:58   ` Rudolf Adamkovič [this message]
2022-10-21 13:02     ` Rudolf Adamkovič
2022-10-21 14:00       ` Ihor Radchenko
2022-11-08 11:50       ` Max Nikulin
2022-11-08 12:41         ` Ihor Radchenko
2022-11-09  0:30         ` Rudolf Adamkovič
2022-11-09  2:19           ` Ihor Radchenko
2022-11-10  0:05             ` Rudolf Adamkovič
2022-11-10  2:12               ` Ihor Radchenko
2022-11-10  8:26                 ` Bruno Barbier
2022-11-10  8:59                   ` Ihor Radchenko
2022-11-10 19:07                     ` Bruno Barbier
2022-11-11 23:13                 ` Rudolf Adamkovič
2022-11-12 13:01                   ` Ihor Radchenko
2022-11-12 22:05                     ` Rudolf Adamkovič
2022-11-13  4:41                       ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m21qr1xri6.fsf@me.com \
    --to=salutis@me.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).