pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
1999-11-17
1999-11-17 20:16:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>
99aaf2a83ba0de08256b57d51c896e98e5f37eb2 (
25
lines) (+
24
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added sscanf() test.
Rev: src/testsuite.in:1.227
1:
-
test_true([["$Id: testsuite.in,v 1.
226
1999/11/
14
23
:
36
:
56
grubba Exp $"]])
+
test_true([["$Id: testsuite.in,v 1.
227
1999/11/
17
20
:
16
:
17
grubba Exp $"]])
cond([[all_constants()->_verify_internals]], [[
1783:
test_equal([[ array_sscanf("02 00 DC 00 0B","%{%x%*[\0-/:-@]%}")[0] ]], [[ ({ ({2}), ({0}), ({220}),({0}), ({11}) }) ]])
+
test_any([[
+
class Bar {
+
string sum = "";
+
void bar(string s) {
+
sum += s;
+
}
+
string foo()
+
{
+
foreach(({ "foo ", "bar ", "baz " }), string s) {
+
sscanf(s, "%*[\t ]%[^ \t]", s);
+
switch(foo) {
+
default:
+
bar(s);
+
break;
+
}
+
}
+
return sum;
+
}
+
};
+
return Bar()->foo()
+
]], "foobarbaz")
-
+
// Basics test_true(1) test_true("")