diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 14:38:26 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:58 +0200 |
commit | d78d95d0c6bfcf0253e4e6387bc0f92095fd4c96 (patch) | |
tree | 9c06ae1b6668d1f0a01205ab6f18336d31360623 | |
parent | f2c2daa40a6398a7d86aad5bed9d6af667d96f21 (diff) |
Use do_run_from_file() for test_memmove
-rw-r--r-- | tests/core/test_memmove.in | 10 | ||||
-rw-r--r-- | tests/core/test_memmove.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 15 |
3 files changed, 15 insertions, 11 deletions
diff --git a/tests/core/test_memmove.in b/tests/core/test_memmove.in new file mode 100644 index 00000000..690075d9 --- /dev/null +++ b/tests/core/test_memmove.in @@ -0,0 +1,10 @@ + + #include <stdio.h> + #include <string.h> + int main() { + char str[] = "memmove can be very useful....!"; + memmove (str+20, str+15, 11); + puts(str); + return 0; + } +
\ No newline at end of file diff --git a/tests/core/test_memmove.out b/tests/core/test_memmove.out new file mode 100644 index 00000000..e2a1ac2f --- /dev/null +++ b/tests/core/test_memmove.out @@ -0,0 +1 @@ +memmove can be very very useful
\ No newline at end of file diff --git a/tests/test_core.py b/tests/test_core.py index ddffddb1..35c208bc 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -2556,17 +2556,10 @@ The current type of b is: 9 self.do_run_from_file(src, output, args=['--file', 'foobar', '-b']) def test_memmove(self): - src = ''' - #include <stdio.h> - #include <string.h> - int main() { - char str[] = "memmove can be very useful....!"; - memmove (str+20, str+15, 11); - puts(str); - return 0; - } - ''' - self.do_run(src, 'memmove can be very very useful') + test_path = path_from_root('tests', 'core', 'test_memmove') + src, output = (test_path + s for s in ('.in', '.out')) + + self.do_run_from_file(src, output) def test_memmove2(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip('need ta2') |