blob: 824f69d742e3fd0aa79efaab0fa63b81ade9bff0 [file] [log] [blame] [edit]
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <emscripten.h>
int main()
{
const char * file = "/test.txt";
emscripten_wget(file , file);
FILE * f = fopen(file, "r");
int result = 0;
if(f) {
#define BUFSIZE 1024
char buf[BUFSIZE];
fgets(buf, BUFSIZE, f);
buf[BUFSIZE-1] = 0;
for(int i = 0; i < BUFSIZE; ++i)
buf[i] = tolower(buf[i]);
if(strstr(buf, "emscripten"))
result = 1;
fclose(f);
}
REPORT_RESULT();
return 0;
}