noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 102/151: Improve DOC for Scenario


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 102/151: Improve DOC for Scenario
Date: Sat, 4 Feb 2017 17:14:31 +0000 (UTC)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 78423c971afb305a89cc7341a7b48b7214d2d960
Author: Rachel <address@hidden>
Date:   Fri Dec 16 15:46:58 2016 +0100

    Improve DOC for Scenario
---
 scenario/test_parse_formula.php |   55 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/scenario/test_parse_formula.php b/scenario/test_parse_formula.php
new file mode 100644
index 0000000..b14a59e
--- /dev/null
+++ b/scenario/test_parse_formula.php
@@ -0,0 +1,55 @@
+<?
+//@description:Impress::check_formula test 
+/*
+# check the Impress::check_formula and the parse_formula
+# This file is a part of NOALYSS under GPL
+# Author D. DE BONTRIDDER address@hidden
+*/
+
+include_once NOALYSS_INCLUDE.'/lib/class_impress.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 (Impress::check_formula($a)==false)?'Non valide ':'ok';
+
+  echo '<br>';
+  
+  foreach (array('+','-','/') as $b ) {
+    $ee=str_replace('*',$b,$a);
+    echo "Testing :".$ee;
+    echo (Impress::check_formula($ee)==false)?'Non valide ':'ok';
+    echo '<br>';
+
+  }
+  for($e=0;$e<3;$e++) {
+    $a.="*".$a;
+  echo "Testing :".$a;
+  echo (Impress::check_formula($a)==false)?'Non valide ':'ok';
+  echo '<br>';
+
+  }
+ }
+
+?>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]