aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/core/test_memmove3.in10
-rw-r--r--tests/core/test_memmove3.out1
-rw-r--r--tests/test_core.py15
3 files changed, 15 insertions, 11 deletions
diff --git a/tests/core/test_memmove3.in b/tests/core/test_memmove3.in
new file mode 100644
index 00000000..a28267cd
--- /dev/null
+++ b/tests/core/test_memmove3.in
@@ -0,0 +1,10 @@
+
+ #include <stdio.h>
+ #include <string.h>
+ int main() {
+ char str[] = "memmove can be vvery useful....!";
+ memmove(str+15, str+16, 17);
+ puts(str);
+ return 0;
+ }
+ \ No newline at end of file
diff --git a/tests/core/test_memmove3.out b/tests/core/test_memmove3.out
new file mode 100644
index 00000000..1adadcc2
--- /dev/null
+++ b/tests/core/test_memmove3.out
@@ -0,0 +1 @@
+memmove can be very useful....! \ No newline at end of file
diff --git a/tests/test_core.py b/tests/test_core.py
index c8ae31a1..59a5261c 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -2570,17 +2570,10 @@ The current type of b is: 9
self.do_run_from_file(src, output)
def test_memmove3(self):
- src = '''
- #include <stdio.h>
- #include <string.h>
- int main() {
- char str[] = "memmove can be vvery useful....!";
- memmove(str+15, str+16, 17);
- puts(str);
- return 0;
- }
- '''
- self.do_run(src, 'memmove can be very useful....!')
+ test_path = path_from_root('tests', 'core', 'test_memmove3')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
def test_flexarray_struct(self):
src = r'''