Sha256: 1c4b80477756c7b5af05ce9c9acaa51879e44289352a8616e2a48d765a31976f

Contents?: true

Size: 497 Bytes

Versions: 3

Compression:

Stored size: 497 Bytes

Contents

#include "helpers.h"
#include "deps/file2str/file2str.h"
#include "deps/trim/trim.h"
#include "clar.h"
#include <stdio.h>
#include <string.h>

char * read_fixture_tex(char *filename)
{
  return file2str(cl_fixture(filename));
}

char * read_fixture_mml(char *filename)
{
  char * data = file2str(cl_fixture(filename));

  return trim(data);
}

void write_test_file(char * data)
{
  FILE *fp = fopen(cl_fixture("../test.html"), "w+");
  if (fp != NULL) {
    fputs(data, fp);
    fclose(fp);
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mathematical-1.3.0 ext/mathematical/mtex2MML/tests/helpers.c
mathematical-1.2.2 ext/mathematical/mtex2MML/tests/helpers.c
mathematical-1.2.1 ext/mathematical/mtex2MML/tests/helpers.c