From 2a0c6ff3efdc46ffb6e94adc918740b26e11547d Mon Sep 17 00:00:00 2001 From: John Schmidt Date: Wed, 9 Apr 2014 18:51:36 +0200 Subject: Fix broken build due to unit test include order Commit 4348d1e6f74a87af55c6c01e7a0cb292e9dec114 introduced a bug that breaks the unit tests unless they run in a certain order. Both path.moon and os/fs.moon tries to include the same Enum, which fails since ffi.cdef can only include definitions once. This solves the bug by using Lua variables instead of ffi.cdef Enums. --- test/unit/path.moon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/path.moon b/test/unit/path.moon index 67d78f8ca1..fafe84967e 100644 --- a/test/unit/path.moon +++ b/test/unit/path.moon @@ -16,7 +16,8 @@ char_u *path_next_component(char_u *fname); -- import constants parsed by ffi {:kEqualFiles, :kDifferentFiles, :kBothFilesMissing, :kOneFileMissing, :kEqualFileNames} = path NULL = ffi.cast 'void*', 0 -{:OK, :FAIL} = path +OK = 1 +FAIL = 0 describe 'path function', -> describe 'path_full_compare', -> -- cgit