Skip to content

Commit 7bcd697

Browse files
at
1 parent 88e12e1 commit 7bcd697

7 files changed

Lines changed: 72 additions & 67 deletions

File tree

build.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ local function test_unit(unit,start_assignature)
5555

5656
print("testing: "..file_path)
5757

58-
local output = io.popen("lua "..file_path,"r"):read()
58+
local output,code = io.popen("lua "..file_path,"r"):read("a")
5959
if output then
6060
dtw.write_file(unit.."expected.txt",output)
6161
end
@@ -96,7 +96,7 @@ local function main()
9696

9797
print("compiling")
9898

99-
local code = os.execute("gcc -Wall -shared -fpic -fsanitize=address -o luaFluidJson/luaFluidJson_lib.so src/main.c")
99+
local code = os.execute("gcc -Wall -shared -fpic -o luaFluidJson/luaFluidJson_lib.so src/main.c")
100100
if code == 1 then
101101
return
102102
end

src/dependencies/LuaCEmbed.h

Lines changed: 49 additions & 52 deletions
Large diffs are not rendered by default.

test/main_test/dump_to_file/expected.txt

Whitespace-only changes.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "Nateus",
3-
"age": 27,
2+
"maried": false,
43
"sons": [{
5-
"name": "son1",
6-
"maried": null
4+
"maried": null,
5+
"name": "son1"
76
}],
8-
"maried": false
7+
"age": 27,
8+
"name": "Nateus"
99
}

test/main_test/dump_to_string/dump_to_string.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ local user ={
44

55
name='Nateus',
66
age=27,
7+
maried=true,
78
sons={
8-
{name='son1',maried=true }
9+
{name='son1',maried=false }
910
}
1011
}
1112
local ident = true
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
{
1+
{
2+
"age": 27,
3+
"name": "Nateus",
4+
"maried": true,
5+
"sons": [{
6+
"maried": false,
7+
"name": "son1"
8+
}]
9+
}

teste.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
2-
json = require("luaFluidJson/luaFluidJson")
1+
local json = require("luaFluidJson/luaFluidJson")
32

43
local user ={
54

65
name='Nateus',
7-
sss=true,
8-
9-
age=27.4,
6+
age=27,
7+
maried=true,
108
sons={
11-
{name='son1',maried=true }
9+
{name='son1',maried=false }
1210
}
1311
}
1412
local ident = true
1513
local value = json.dumps_to_string(user,ident);
14+
1615
print(value)
1716

0 commit comments

Comments
 (0)