aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/files.cpp9
-rw-r--r--tests/runner.py7
2 files changed, 15 insertions, 1 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;
}
diff --git a/tests/runner.py b/tests/runner.py
index a2864aac..7bb5f5ab 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1650,8 +1650,13 @@ if 'benchmark' not in sys.argv:
'''this._STDIO.prepare('somefile.binary', [100, 200, 50, 25, 10, 77, 123]);''' # 200 becomes -56, since signed chars are used in memory
)
open(filename, 'w').write(src)
+
+ other = open(os.path.join(self.get_dir(), 'test.file'), 'w')
+ other.write('some data');
+ other.close()
+
src = open(path_from_root('tests', 'files.cpp'), 'r').read()
- self.do_test(src, 'size: 7\ndata: 100,-56,50,25,10,77,123\ntexto\ntexte\n5 : 10,30,20,11,88\n', post_build=post)
+ self.do_test(src, 'size: 7\ndata: 100,-56,50,25,10,77,123\ntexto\ntexte\n5 : 10,30,20,11,88\nother=some data.\n', post_build=post)
### 'Big' tests