Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lyskom-server-ceder-1616-generations-topgit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
ae5ef676
Commit
ae5ef676
authored
Aug 09, 2000
by
Per Cederqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lots of test cases added. Still only tests creation and get-text-stat.
parent
2bdc29ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
11 deletions
+76
-11
src/server/testsuite/lyskomd.0/gen-15.py
src/server/testsuite/lyskomd.0/gen-15.py
+76
-11
No files found.
src/server/testsuite/lyskomd.0/gen-15.py
View file @
ae5ef676
import
string
class
factory
:
def
__init__
(
self
,
bcc_trigg
,
bcc_visible
,
other_trigg
,
other_visible
):
def
__init__
(
self
,
bcc_trigg
,
bcc_visible
,
other_trigg
,
other_visible
,
rd
):
self
.
__bcc_trigg
=
bcc_trigg
self
.
__bcc_visible
=
bcc_trigg
+
bcc_visible
self
.
__other_trigg
=
bcc_trigg
+
other_trigg
...
...
@@ -9,6 +9,7 @@ class factory:
for
n
in
bcc_visible
:
if
n
not
in
self
.
__other_visible
:
self
.
__other_visible
.
append
(
n
)
self
.
__readable
=
bcc_trigg
+
other_trigg
+
rd
def
create
(
self
,
misc
,
conf
,
loc
):
if
misc
==
15
:
...
...
@@ -17,16 +18,17 @@ class factory:
else
:
trigg
=
self
.
__other_trigg
visib
=
self
.
__other_visible
return
misc_group
(
misc
,
conf
,
loc
,
trigg
,
visib
)
return
misc_group
(
misc
,
conf
,
loc
,
trigg
,
visib
,
self
.
__readable
)
class
misc_group
:
def
__init__
(
self
,
misc
,
conf
,
loc
,
trigg
,
visib
):
def
__init__
(
self
,
misc
,
conf
,
loc
,
trigg
,
visib
,
readable
):
self
.
__misc
=
misc
self
.
__conf
=
conf
self
.
__loc
=
loc
self
.
__trigg
=
trigg
self
.
__visib
=
visib
self
.
__readable
=
readable
def
miscs
(
self
,
viewer
,
rec_time
=
None
,
sent_by
=
None
,
sent_at
=
None
):
if
viewer
not
in
self
.
__visib
:
...
...
@@ -43,15 +45,57 @@ class misc_group:
def
trigger
(
self
,
viewer
):
return
viewer
in
self
.
__trigg
def
readable
(
self
,
viewer
):
return
viewer
in
self
.
__readable
# (creator, recipient):
trigger-bcc, trigger-other, is-visible-for
# (creator, recipient):
bcc-trigg, bcc-vis, other-trigg, other-vis, rd
obj
=
{
(
6
,
6
):
factory
([
6
],
[],
[],
[
7
,
8
,
9
]),
(
6
,
7
):
factory
([
7
],
[
6
],
[],
[
8
,
9
]),
(
6
,
8
):
factory
([
8
],
[
6
],
[],
[
7
,
9
]),
(
6
,
9
):
factory
([
9
],
[
6
],
[],
[
7
,
8
]),
(
6
,
10
):
factory
([
7
,
8
],
[
6
],
[],
[
9
]),
(
6
,
6
):
factory
([
6
],
[],
[],
[
7
,
8
,
9
],
[]),
(
6
,
7
):
factory
([],
[
6
,
7
],
[],
[
8
,
9
],
[
7
]),
(
6
,
8
):
factory
([
8
],
[
6
],
[],
[
7
,
9
],
[]),
(
6
,
9
):
factory
([
9
],
[
6
],
[],
[
7
,
8
],
[]),
(
6
,
10
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
6
,
9
]),
(
6
,
11
):
factory
([
7
,
8
],
[
6
],
[],
[
9
],
[]),
(
6
,
12
):
factory
([
7
,
8
],
[
6
],
[],
[
9
],
[]),
(
6
,
13
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
6
,
9
]),
(
6
,
14
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
9
]),
(
6
,
15
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
9
]),
(
7
,
6
):
factory
([
6
],
[
7
],
[],
[
8
,
9
],
[]),
(
7
,
7
):
factory
([],
[
7
],
[],
[
6
,
8
,
9
],
[
7
]),
(
7
,
8
):
factory
([
8
],
[
7
],
[],
[
6
,
7
,
9
],
[]),
(
7
,
9
):
factory
([
9
],
[
7
],
[],
[
6
,
7
,
8
],
[]),
(
7
,
10
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
6
,
9
]),
(
7
,
11
):
factory
([
7
,
8
],
[],
[],
[
6
,
9
],
[]),
(
7
,
12
):
factory
([
7
,
8
],
[],
[],
[],
[]),
(
7
,
13
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
6
,
9
]),
(
7
,
14
):
factory
([
7
,
8
],
[
9
],
[],
[
6
],
[
9
]),
(
7
,
15
):
factory
([
7
,
8
],
[
9
],
[],
[],
[
9
]),
(
8
,
6
):
factory
([
6
],
[
8
],
[],
[
7
,
9
],
[]),
(
8
,
7
):
factory
([],
[
7
,
8
],
[],
[
6
,
9
],
[
7
]),
(
8
,
8
):
factory
([
8
],
[],
[],
[
6
,
7
,
9
],
[]),
(
8
,
9
):
factory
([
9
],
[
8
],
[],
[
6
,
7
],
[]),
(
8
,
10
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
6
,
9
]),
(
8
,
11
):
factory
([
7
,
8
],
[],
[],
[
6
,
9
],
[]),
(
8
,
12
):
factory
([
7
,
8
],
[],
[],
[],
[]),
(
8
,
13
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
6
,
9
]),
(
8
,
14
):
factory
([
7
,
8
],
[
9
],
[],
[
6
],
[
9
]),
(
8
,
15
):
factory
([
7
,
8
],
[
9
],
[],
[],
[
9
]),
(
9
,
6
):
factory
([
6
],
[
9
],
[],
[
7
,
8
],
[]),
(
9
,
7
):
factory
([],
[
7
,
9
],
[],
[
6
,
8
],
[
7
]),
(
9
,
8
):
factory
([
8
],
[
9
],
[],
[
6
,
7
],
[]),
(
9
,
9
):
factory
([
9
],
[],
[],
[
6
,
7
,
8
],
[]),
(
9
,
10
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
6
,
9
]),
(
9
,
11
):
factory
([
7
,
8
],
[
9
],
[],
[],
[]),
(
9
,
12
):
factory
([
7
,
8
],
[
9
],
[],
[],
[]),
(
9
,
13
):
factory
([
7
,
8
],
[
6
,
9
],
[],
[],
[
6
,
9
]),
(
9
,
14
):
factory
([
7
,
8
],
[
9
],
[],
[
6
],
[
9
]),
(
9
,
15
):
factory
([
7
,
8
],
[
9
],
[],
[],
[
9
]),
}
class
loc_no_allocator
:
...
...
@@ -99,6 +143,22 @@ def create(author, recipients):
new_text
(
author
,
tx
,
misc
)
talk_to
(
author
)
print
"simple_expect
\"
=%d %d
\"
"
%
(
cs
,
tx
)
for
p
in
PERSONS
:
talk_to
(
p
)
print
"send
\"
%d 90 %d
\\
n
\"
"
%
(
ref
.
next
(),
tx
)
visib
=
p
==
author
pattern
=
[]
for
m
in
misc
:
pattern
=
pattern
+
m
.
miscs
(
p
)
if
m
.
readable
(
p
):
visib
=
1
if
visib
:
print
"simple_expect
\"
=%d $any_time "
\
"%d 0 %d 0 %d { %s } 0
\\\\\\
*
\"
"
%
(
ref
.
curr
,
author
,
len
(
"text %d"
%
tx
),
len
(
pattern
),
string
.
join
(
pattern
,
" "
))
else
:
print
"simple_expect
\"
%%%d 14 %d
\"
"
%
(
ref
.
curr
,
tx
)
return
(
tx
,
misc
)
PERSONS
=
range
(
6
,
10
)
...
...
@@ -117,7 +177,7 @@ def new_text(author, txt, misc):
"%d 0 %d 0 %d { %s } 0
\\\\\\
*
\"
"
%
(
txt
,
author
,
len
(
"text %d"
%
txt
),
len
(
pattern
),
string
.
join
(
pattern
,
" "
))
el
se
:
el
if
author
!=
viewer
:
talk_to
(
viewer
)
print
"send
\"
%d 35
\\
n
\"
"
%
ref
.
next
()
print
"simple_expect
\"
=%d $any_time
\"
"
%
ref
.
curr
...
...
@@ -182,5 +242,10 @@ def disco():
print
"lyskomd_death"
setup
()
create
(
6
,
[(
0
,
6
)])
for
author
in
[
6
,
7
,
8
,
9
]:
for
misc
in
[
0
,
1
,
15
]:
for
rcpt
in
[
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
]:
if
author
in
[
6
,
9
]
and
rcpt
in
[
12
,
15
]:
continue
create
(
author
,
[(
misc
,
rcpt
)])
disco
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment