[interchange-cvs] interchange - heins modified 3 files
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Fri Apr 4 22:49:23 2003
User: heins
Date: 2003-04-05 03:38:36 GMT
Modified: dist/test catalog.cfg
Modified: dist/test/products tests.asc
Added: dist/test/products userdb.txt
Log:
* Add some tests for FileControl intrinsics.
Revision Changes Path
2.5 +15 -0 interchange/dist/test/catalog.cfg
rev 2.5, prev_rev 2.4
Index: catalog.cfg
===================================================================
RCS file: /var/cvs/interchange/dist/test/catalog.cfg,v
retrieving revision 2.4
retrieving revision 2.5
diff -u -r2.4 -r2.5
--- catalog.cfg 23 Jan 2003 05:00:16 -0000 2.4
+++ catalog.cfg 5 Apr 2003 03:38:36 -0000 2.5
@@ -13,6 +13,9 @@
Database sort sort.asc TAB
Database sort MEMORY 1
+Database userdb userdb.txt TAB
+UserDB default crypt 0
+
ProductFiles products products2
Variable SERVER_NAME bill.minivend.com
@@ -61,6 +64,7 @@
Password bAWoVkuzphOX.
ReadPermission group
+WritePermission group
RobotLimit 50
SalesTax zip,state
@@ -120,3 +124,14 @@
Locale en_US default 1
Pragma safe_data
+FileControl include/test/logged ic_logged
+FileControl include/test/scratch ic_scratch:scratch_acl
+FileControl include/test/scratch_deny ic_scratch:!scratch_acl
+FileControl include/test/scratch_cmp ic_scratch:scratch_cmp:foo
+FileControl include/test/scratch_cmp_deny ic_scratch:!scratch_cmp:foo
+FileControl include/test/session_cmp ic_session:session_cmp:foo
+FileControl include/test/session_cmp_deny ic_session:!session_cmp:foo
+FileControl include/test/session ic_session:session_acl
+FileControl include/test/session_deny ic_session:!session_acl
+FileControl include/test/file_acl ic_userdb
+FileControl include/test/path ic_userdb
2.8 +107 -8 interchange/dist/test/products/tests.asc
rev 2.8, prev_rev 2.7
Index: tests.asc
===================================================================
RCS file: /var/cvs/interchange/dist/test/products/tests.asc,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- tests.asc 2 Mar 2003 18:00:24 -0000 2.7
+++ tests.asc 5 Apr 2003 03:38:36 -0000 2.8
@@ -2047,20 +2047,119 @@
%%
sparse quantity pricing check (introduced in Interchange 4.9.7)
%%%
-999999
+000134
%%
-[the test] [perl]
-# Make this come out right
-return 'The expected result as a regex.';
-[/perl]
+[set scratch_acl]0[/set]
+[include include/test/scratch]
+[include include/test/scratch_deny]
%%
-The expected result as a regex.
+OK include/test/scratch_deny\s*$
%%
-The NOT expected result.
+OK.*OK
%%
%%
-Skeleton test.
+Test FileControl ic_scratch acl
+%%%
+000135
+%%
+[set scratch_acl]1[/set]
+[include include/test/scratch]
+[include include/test/scratch_deny]
+[set scratch_acl][/set]
+%%
+OK include/test/scratch\s*$
+%%
+scratch_deny
+%%
+
+%%
+Test FileControl ic_scratch acl
+%%%
+000136
+%%
+[set scratch_cmp]foo[/set]
+[include include/test/scratch_cmp]
+[include include/test/scratch_cmp_deny]
+%%
+^\s*OK include/test/scratch_cmp\s*$
+%%
+scratch_cmp_deny
+%%
+
+%%
+Test FileControl ic_scratch acl
+%%%
+000137
+%%
+[set scratch_cmp]bar[/set]
+[include include/test/scratch_cmp]
+[include include/test/scratch_cmp_deny]
+[set scratch_cmp][/set]
+%%
+^\s*OK include/test/scratch_cmp_deny\s*$
+%%
+scratch_cmp\s*.*scratch_cmp
+%%
+
+%%
+Test FileControl ic_scratch acl
+%%%
+000138
+%%
+[data base=session field=session_cmp value=foo]
+[include include/test/session_cmp]
+[include include/test/session_cmp_deny]
+%%
+^\s*OK include/test/session_cmp\s*$
+%%
+session_cmp_deny
+%%
+
+%%
+Test FileControl ic_session acl
+%%%
+000139
+%%
+[data base=session field=session_cmp value=bar]
+[include include/test/session_cmp]
+[include include/test/session_cmp_deny]
+%%
+^\s*OK include/test/session_cmp_deny\s*$
+%%
+session_cmp\s*.*session_cmp_deny
+%%
+
+%%
+Test FileControl ic_session acl
+%%%
+000140
+%%
+[userdb function=logout hide=1]
+[include include/test/file_acl]
+%%
+
+%%
+OK
+%%
+
+%%
+Test FileControl ic_userdb acl
+%%%
+000141
+%%
+[userdb function=login username=jking password=king]
+[userdb function=set_file_acl location=include/test/file_acl mode=r]
+[include include/test/file_acl]
+[userdb function=logout]
+%%
+1\s*OK
+%%
+^OK
+%%
+
+%%
+Test FileControl ic_userdb acl
%%%
999999
%%
2.1 interchange/dist/test/products/userdb.txt
rev 2.1, prev_rev 2.0