Browse Source

Test org-babel code execution

master
Nick Rozinsky 10 months ago
parent
commit
a52bc2f018
1 changed files with 43 additions and 0 deletions
  1. +43
    -0
      docs.org

+ 43
- 0
docs.org View File

@@ -0,0 +1,43 @@
#+TITLE: Dlang test

#+NAME: code-test
#+begin_src D
void writeSomethingToFile(){
writefln ("code-test block test");
}
#+end_src

#+RESULTS: code-test
: 0

#+NAME: testAs
#+begin_src D
int testAssert(){
assert(1==0);
}
#+end_src

#+NAME: data
#+begin_src D
string test = "Data block test";
#+end_src
#+begin_src D :noweb yes

class FileWriter{

<<code-test>>
}

<<testAs>>
void main(){
<<data>>
writefln(test);
auto fileWriter = new FileWriter();
fileWriter.writeSomethingToFile();
testAssert();
writefln("Unreachable");

}
#+end_src

#+RESULTS:

Loading…
Cancel
Save