Add devlp script
This commit is contained in:
parent
86b2ec3a46
commit
f4356a4a8e
4 changed files with 73 additions and 0 deletions
2
dev/README
Normal file
2
dev/README
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Tools for developpers only
|
||||
Don't use them if you don't know their purpose
|
||||
13
dev/reset.sql
Normal file
13
dev/reset.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
\t
|
||||
\o reset_seq_jrn.sql
|
||||
select 'select setval (''s_jrn_'||jrn_def_id||''',1,false);' from jrn_def;
|
||||
\o
|
||||
\t
|
||||
|
||||
\i reset_seq_jrn.sql
|
||||
select setval('s_centralized',1,false);
|
||||
select setval('s_central',1,false);
|
||||
delete from centralized;
|
||||
update jrnx set j_centralized='f';
|
||||
select setval('s_central_order',1,false);
|
||||
|
||||
10
dev/reset_seq_jrn.sql
Normal file
10
dev/reset_seq_jrn.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
select setval ('s_jrn_4',1,false);
|
||||
select setval ('s_jrn_3',1,false);
|
||||
select setval ('s_jrn_1',1,false);
|
||||
select setval ('s_jrn_2',1,false);
|
||||
select setval ('s_jrn_5',1,false);
|
||||
select setval ('s_jrn_6',1,false);
|
||||
select setval ('s_jrn_7',1,false);
|
||||
select setval ('s_jrn_8',1,false);
|
||||
select setval ('s_jrn_9',1,false);
|
||||
|
||||
48
dev/test_parse_formula.php
Normal file
48
dev/test_parse_formula.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?
|
||||
include_once('impress_inc.php');
|
||||
|
||||
echo '<hr>';
|
||||
foreach ( array('1',
|
||||
'(45+5)',
|
||||
'round([45])',
|
||||
'$A=9',
|
||||
'$S30=($F1 >=0)?$F1:0',
|
||||
|
||||
'[45%]',
|
||||
'[50]*[51%]',
|
||||
'$A1=[50]*[51%]',
|
||||
'[50]*9',
|
||||
'[50]*9.0',
|
||||
'[50%]*9',
|
||||
'$C1111=[50%]*9',
|
||||
'$C1111=[50%]*9*$D1',
|
||||
'$C10=[10%]',
|
||||
'[50%]*9.0',
|
||||
'[50%]*9.0 FROM=01.2004',
|
||||
'[50%]*9.0FROM=01.2004',
|
||||
'system',
|
||||
'unlink',
|
||||
'ls -1')
|
||||
as $a ) {
|
||||
echo "Testing :".$a;
|
||||
echo (CheckFormula($a)==false)?'Non valide ':'ok';
|
||||
|
||||
echo '<br>';
|
||||
|
||||
foreach (array('+','-','/') as $b ) {
|
||||
$ee=str_replace('*',$b,$a);
|
||||
echo "Testing :".$ee;
|
||||
echo (CheckFormula($ee)==false)?'Non valide ':'ok';
|
||||
echo '<br>';
|
||||
|
||||
}
|
||||
for($e=0;$e<3;$e++) {
|
||||
$a.="*".$a;
|
||||
echo "Testing :".$a;
|
||||
echo (CheckFormula($a)==false)?'Non valide ':'ok';
|
||||
echo '<br>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue