pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
1996-10-15
1996-10-15 04:03:35 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
747bb8c9da03060da94c2116e50b04e7ccaac4f7 (
28
lines) (+
20
/-
8
)
[
Show
|
Annotate
]
Branch:
7.9
more tests added
Rev: src/modules/sprintf/testsuite.in:1.7
Rev: src/testsuite.in:1.5
40:
test_true(mappingp(localtime(0))) ]])
-
// strerror
-
cond([[all_efuns()->strerror]],
-
[[
-
test_do(strerror(1))
-
test_true(stringp(strerror(2)||""))
-
]])
-
-
+
// sort test_equal(sort(({1,3,2,4})),({1,2,3,4})) test_equal(sort(({4,3,2,1})),({1,2,3,4}))
79:
]]) test_any([[
+
#include <getopt.h>
+
return 0;
+
]],0)
+
+
test_true(find_option(({"","--foo"}),"p","foo"))
+
test_eq(find_option(({"","--foo=bar"}),"p","foo",0,0),"bar")
+
test_eq(find_option(({"","--foo","bar"}),"p","foo",0,0),"bar")
+
test_eq(find_option(({"","--","--foo=bar"}),"p","foo",0,0),0)
+
+
test_true(find_option(({"","-p"}),"p","foo"))
+
test_eq(find_option(({"","-pbar"}),"p","foo",0,0),"bar")
+
test_eq(find_option(({"","-p","bar"}),"p","foo",0,0),"bar")
+
test_eq(find_option(({"","--","--p","bar"}),"p","foo",0,0),0)
+
+
test_equal(get_args(({"",0,0,"sune","--","-foo"})),({"","sune","-foo"}))
+
+
test_any([[
#include <string.h> return 0; ]],0)
90:
test_eq((string)Flurp,"testtest") test_do(add_constant("Flurp"))
+
test_eq(strmult("foo",4),"foofoofoofoo")
+
// m_delete test_equal(([1:1]),m_delete(a(),0)) test_equal(([1:1]),m_delete(([1:1,0:3]),0))