<commit_before>using Weave
using Base.Test

function mmtest(source, resfile, doctype)
  VER = "$(VERSION.major).$(VERSION.minor)"
  weave("documents/$source", out_path = "documents/multimedia/$resfile", doctype=doctype, plotlib=nothing)
  result =  readstring(open("documents/multimedia/$resfile"))
  ref =  readstring(open("documents/multimedia/$VER/$resfile.ref"))
  @test result == ref
  rm("documents/multimedia/$resfile")
end

mmtest("rich_output.jmd", "rich_output.md", "pandoc")
mmtest("rich_output.jmd", "rich_output.tex", "tex")<commit_msg>Fix test cleaning on windows<commit_after>using Weave
using Base.Test

function mmtest(source, resfile, doctype)
  VER = "$(VERSION.major).$(VERSION.minor)"
  weave("documents/$source", out_path = "documents/multimedia/$resfile", doctype=doctype, plotlib=nothing)
  result =  readstring("documents/multimedia/$resfile")
  ref =  readstring("documents/multimedia/$VER/$resfile.ref")
  @test result == ref
  rm("documents/multimedia/$resfile")
end

mmtest("rich_output.jmd", "rich_output.md", "pandoc")
mmtest("rich_output.jmd", "rich_output.tex", "tex")
{'fraction_non_alphanumeric': 0.16712079927338783, 'fraction_numerical': 0.0, 'mean_word_length': 6.706293706293707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5283215', 'n_tokens_mistral': 389, 'n_tokens_neox': 366, 'n_words': 63}