mirror of https://github.com/swig/swig
Duplicate tests that are run twice as both C and C++ tests to fix parallel make: keyword_rename
This commit is contained in:
parent
bc3bf51af2
commit
78b113558f
|
@ -616,7 +616,7 @@ C_TEST_CASES += \
|
||||||
inctest \
|
inctest \
|
||||||
infinity \
|
infinity \
|
||||||
integers \
|
integers \
|
||||||
keyword_rename \
|
keyword_rename_c \
|
||||||
lextype \
|
lextype \
|
||||||
li_carrays \
|
li_carrays \
|
||||||
li_cdata \
|
li_cdata \
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "./keyword_rename_c"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
keyword_rename_c.Xgo(1)
|
||||||
|
keyword_rename_c.Xchan(1)
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
* Test reserved keyword renaming
|
||||||
|
*/
|
||||||
|
|
||||||
|
%module keyword_rename_c
|
||||||
|
|
||||||
|
%include "keyword_rename.i"
|
|
@ -0,0 +1,12 @@
|
||||||
|
require("import") -- the import fn
|
||||||
|
import("keyword_rename_c") -- import lib into global
|
||||||
|
kn=keyword_rename_c--alias
|
||||||
|
|
||||||
|
-- catching undefined variables
|
||||||
|
local env = _ENV -- Lua 5.2
|
||||||
|
if not env then env = getfenv () end -- Lua 5.1
|
||||||
|
setmetatable(env, {__index=function (t,i) error("undefined global variable `"..i.."'",2) end})
|
||||||
|
|
||||||
|
-- Check renaming of Lua keywords
|
||||||
|
assert(kn.c_end(5) == 5)
|
||||||
|
assert(kn.c_nil(7) == 7)
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
import keyword_rename_c
|
||||||
|
keyword_rename_c._in(1)
|
||||||
|
keyword_rename_c._except(1)
|
Loading…
Reference in New Issue