diff options
author | Andreas Rumpf <andreas@andi> | 2008-06-22 16:14:11 +0200 |
---|---|---|
committer | Andreas Rumpf <andreas@andi> | 2008-06-22 16:14:11 +0200 |
commit | 405b86068e6a3d39970b9129ceec0a9108464b28 (patch) | |
tree | c0449946f54baae6ea88baf453157ddd7faa8f86 /tests/tarrindx.nim | |
download | Nim-405b86068e6a3d39970b9129ceec0a9108464b28.tar.gz |
Initial import
Diffstat (limited to 'tests/tarrindx.nim')
-rwxr-xr-x | tests/tarrindx.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/tarrindx.nim b/tests/tarrindx.nim new file mode 100755 index 000000000..caacff22b --- /dev/null +++ b/tests/tarrindx.nim @@ -0,0 +1,13 @@ +# test another strange bug ... (I hate this compiler; it is much too buggy!) + +proc putEnv(key, val: string) = + # XXX: we have to leak memory here, as we cannot + # free it before the program ends (says Borland's + # documentation) + var + env: ptr array[0..500000, char] + env = alloc(length(key) + length(val) + 2) + for i in 0..length(key)-1: env[i] = key[i] + env[length(key)] = '=' + for i in 0..length(val)-1: + env[length(key)+1+i] = val[i] |