tests: Various improvements
- Don't be verbose when removing files. - Reverse diff order so output makes more sense. - Only strip whitespace from the end of lines. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
328c6f70e8
commit
0ed8e48668
|
@ -10,7 +10,7 @@
|
|||
/* A bit hackish, but it works... */
|
||||
static void rm_dir(const char *dir)
|
||||
{
|
||||
std::string cmd = "rm -frv ";
|
||||
std::string cmd = "rm -rf ";
|
||||
cmd += dir;
|
||||
cmd += "/ocarina-test";
|
||||
system(cmd.c_str());
|
||||
|
|
|
@ -16,11 +16,11 @@ def run_test(target, source, env):
|
|||
|
||||
if (len(source) == 2) and (ret == 0):
|
||||
good = str(source[1])
|
||||
if (subprocess.call("diff -u %s %s" % (res, good), shell = True) != 0):
|
||||
if (subprocess.call("diff -u %s %s" % (good, res), shell = True) != 0):
|
||||
print
|
||||
else:
|
||||
for line in open( str(target[0]) ):
|
||||
print line.strip()
|
||||
print line.rstrip()
|
||||
print
|
||||
|
||||
def Test(group, src):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Test that a file object can be created.
|
||||
* Test that a file object can be created and resolves paths correctly.
|
||||
*/
|
||||
#include <file.h>
|
||||
#include <print.h>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
removed ‘/home/anna/.local/share/ocarina-test/test.4’
|
||||
removed ‘/home/anna/.local/share/ocarina-test/test.3’
|
||||
removed directory: ‘/home/anna/.local/share/ocarina-test’
|
||||
|
||||
ERROR: NOT_OPEN is not a legal OpenMode (/home/anna/.local/share/ocarina-test/test.0)
|
||||
Test 0: Passed
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
removed ‘/home/anna/.local/share/ocarina-test/test.4’
|
||||
removed ‘/home/anna/.local/share/ocarina-test/test.3’
|
||||
removed directory: ‘/home/anna/.local/share/ocarina-test’
|
||||
|
||||
Test 0: Passed
|
||||
|
||||
|
|
Loading…
Reference in New Issue