forked from Mirror/wren
Remove magic values as exit codes in test application (#777)
This commit is contained in:
19
test/test.h
19
test/test.h
@ -6,6 +6,23 @@
|
||||
#include <string.h>
|
||||
#include "wren.h"
|
||||
|
||||
// Exit codes used by the wren binaries, following the BSD standard
|
||||
//
|
||||
// The interpreter was used with an incorrect number of arguments
|
||||
#define WREN_EX_USAGE 64
|
||||
|
||||
// Compilation error
|
||||
#define WREN_EX_DATAERR 65
|
||||
|
||||
// Runtime error
|
||||
#define WREN_EX_SOFTWARE 70
|
||||
|
||||
// Cannot open input file
|
||||
#define WREN_EX_NOINPUT 66
|
||||
|
||||
// I/O Error
|
||||
#define WREN_EX_IOERR 74
|
||||
|
||||
// The maximum number of components in a path. We can't normalize a path that
|
||||
// contains more than this number of parts. The number here assumes a max path
|
||||
// length of 4096, which is common on Linux, and then assumes each component is
|
||||
@ -69,4 +86,4 @@ typedef struct
|
||||
WrenInterpretResult runFile(WrenVM* vm, const char* path);
|
||||
int handle_args(int argc, const char* argv[]);
|
||||
|
||||
#endif //WREN_TEST_H
|
||||
#endif //WREN_TEST_H
|
||||
|
||||
Reference in New Issue
Block a user