diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-05-15 16:26:57 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-05-15 16:26:57 -0700 |
commit | 798e635cf912d778f08f8107d6d59fcd11b20082 (patch) | |
tree | b4627e55014a017c02d952c92feda76d745415ee /tests/files.cpp | |
parent | 3afb3d53d70c6d9a3e84e488cfa986b8cd7b2733 (diff) |
support for reading files synchronously
Diffstat (limited to 'tests/files.cpp')
-rw-r--r-- | tests/files.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/files.cpp b/tests/files.cpp index 5d915e01..99eddec5 100644 --- a/tests/files.cpp +++ b/tests/files.cpp @@ -46,6 +46,15 @@ int main() fclose(inf); printf("%d : %d,%d,%d,%d,%d\n", num, data2[0], data2[1], data2[2], data2[3], data2[4]); + // Test reading a file that has not been cached + + FILE *other = fopen("test.file", "r"); + assert(other); + char otherData[1000]; + fread(otherData, 1, 10, other); + fclose(other); + printf("other=%s.\n", otherData); + return 0; } |