summaryrefslogtreecommitdiff
path: root/test/save.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/save.lua')
-rw-r--r--test/save.lua37
1 files changed, 1 insertions, 36 deletions
diff --git a/test/save.lua b/test/save.lua
index 8c64c568..f16bdf20 100644
--- a/test/save.lua
+++ b/test/save.lua
@@ -1,39 +1,4 @@
-
-
-function savevar (n,v)
- if v == nil then return end;
- if type(v) == "number" then print(n.."="..v) return end
- if type(v) == "string" then print(n.."='"..v.."'") return end
- if type(v) == "table" then
- if v.__visited__ ~= nil then
- print(n .. "=" .. v.__visited__);
- else
- print(n.."=@()")
- v.__visited__ = n;
- local r,f;
- r,f = next(v,nil);
- while r ~= nil do
- if r ~= "__visited__" then
- if type(r) == 'string' then
- savevar(n.."['"..r.."']",f)
- else
- savevar(n.."["..r.."]",f)
- end
- end
- r,f = next(v,r)
- end
- end
- end
-end
-
-function save ()
-local n,v
- n,v = nextvar(nil)
- while n ~= nil do
- savevar(n,v);
- n,v = nextvar(n)
- end
-end
+dofile("dump.lua")
a = 3
x = {a = 4, b = "name", l={4,5,67}}