From 58204f551ff8d4eea928f127e9707117f952d47b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6stlin?= <christian.koestlin@gmail.com>
Date: Sat, 1 Oct 2022 23:55:02 +0200
Subject: [PATCH 2/2] testing/lisp/test-ob-C.el: Add test for dub support in
 ob-C.el

TINYPATCH
---
 testing/examples/ob-C-test.org | 8 ++++++++
 testing/lisp/test-ob-C.el      | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/testing/examples/ob-C-test.org b/testing/examples/ob-C-test.org
index c7a96f665..aa7945d1a 100644
--- a/testing/examples/ob-C-test.org
+++ b/testing/examples/ob-C-test.org
@@ -174,3 +174,11 @@ std::cout << "\"line 1\"\n";
 std::cout << "\"line 2\"\n";
 std::cout << "\"line 3\"\n";
 #+end_src
+
+* Dub tests
+:PROPERTIES:
+:ID:       81E17302-BE76-4E2A-93CA-0A7E121CB7C2
+:END:
+#+begin_src D :dependencies '(mir-algorithm=3.16.2) :imports "mir.combinatorics" :results pp
+    foreach (p; ['a', 'b', 'c'].permutations) { p.write(", "); }
+#+end_src
diff --git a/testing/lisp/test-ob-C.el b/testing/lisp/test-ob-C.el
index b6dbed8e3..0c0f6c8d7 100644
--- a/testing/lisp/test-ob-C.el
+++ b/testing/lisp/test-ob-C.el
@@ -192,5 +192,11 @@
                                "\"line 1\"\n\"line 2\"\n\"line 3\"\n"
                                (org-babel-execute-src-block))))))
 
+(ert-deftest ob-D/dub-basics ()
+  (if (executable-find "dub") (org-test-at-id
+       "81E17302-BE76-4E2A-93CA-0A7E121CB7C2" (org-babel-next-src-block 1)
+                      (should (equal "abc, bac, cab, acb, bca, cba, "
+                                     (org-babel-execute-src-block))))))
+
 (provide 'test-ob-C)
 ;;; test-ob-C.el ends here
-- 
2.37.3

