fork/home-manager
git clone https://git.julia.blue/fork/home-manager
c47c350f
master
1{ config , lib , ...} : 2 3let cfg = config . programs . pandoc ; 4 5in { 6config = lib . mkIf config . test . enableBig { 7programs . pandoc = { 8enable = true ; 9 10defaults = { 11metadata = { author = "John Doe" ; }; 12pdf-engine = "xelatex" ; 13citeproc = true ; 14}; 15}; 16 17nmt . script = '' 18assertFileContent ${ cfg . defaultsFile } ${ ./defaults-expected.json } 19 20# Test that defaults are set by looking at the metadata for an empty file 21# (it should contain the author that we set in defaults). 22output = $( mktemp ) 23${ cfg . finalPackage } /bin/pandoc --standalone \ 24-f markdown /dev/null \ 25-t native -o " $ output " 26assertFileContent " $ output " ${ ./output-expected } 27'' ; 28}; 29} 30