forked from joshbtn/excelFormulaUtilitiesJS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
94 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
107 changes: 54 additions & 53 deletions
107
test/ExcelFormulaUtilities.test.html → test/dev.test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,55 @@ | ||
<!doctype html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title></title> | ||
|
||
<meta name="description" content="qunit tests for src/ExcelFormulatParser.js"> | ||
<meta name="author" content="Josh Bennett"> | ||
|
||
<link rel="stylesheet" href="qunit/qunit.css"> | ||
|
||
<style type="text/css">/*<![CDATA[*/ | ||
footer, header{display:none;} | ||
/*]]>*/</style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<div id="container"> | ||
<header> | ||
<h1>Tests for ExcelFormulatParser</h1> | ||
</header> | ||
<div id="main" role="main"> | ||
<h1 id="qunit-header">QUnit example</h1> | ||
<h2 id="qunit-banner"></h2> | ||
<div id="qunit-testrunner-toolbar"></div> | ||
<h2 id="qunit-userAgent"></h2> | ||
<ol id="qunit-tests"></ol> | ||
<div id="qunit-fixture">test markup, will be hidden</div> | ||
</div> | ||
<footer> | ||
© copyright 2011 Josh Bennett | ||
</footer> | ||
</div> | ||
|
||
<!-- Forumla Checker from http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html --> | ||
<p>This test is taken from<a href="http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html" target="_blank">http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html</a></p> | ||
<p><input type="text" id="formula" style="width: 500px"> | ||
<input type="submit" value="parse it" onclick="window.excelFormulaUtilities.parseFormula('formula', 'tokens'); return false;"></p> | ||
<div id="tokens" style="margin-top: 5px; margin-bottom: 5px"> </div> | ||
<p><strong>Here are some sample formulas, if you want to try it out:</strong></p> | ||
<p>=IF("a"={"a","b";"c",#N/A;-1,TRUE}, "yes", "no") & " more ""test"" text"</p> | ||
<p>=+ AName- (-+-+-2^6) = {"A","B"} + @SUM(R1C1) + (@ERROR.TYPE(#VALUE!) = 2)</p> | ||
<p>=IF(R13C3>DATE(2002,1,6),0,IF(ISERROR(R[41]C[2]),0,IF(R13C3>=R[41]C[2],0, IF(AND(R[23]C[11]>=55,R[24]C[11]>=20),R53C3,0))))</p> | ||
<p>=IF(R[39]C[11]>65,R[25]C[42],ROUND((R[11]C[11]*IF(OR(AND(R[39]C[11]>=55, R[40]C[11]>=20),AND(R[40]C[11]>=20,R11C3="YES")),R[44]C[11],R[43]C[11]))+(R[14]C[11] *IF(OR(AND(R[39]C[11]>=55,R[40]C[11]>=20),AND(R[40]C[11]>=20,R11C3="YES")), R[45]C[11],R[43]C[11])),0))</p> | ||
|
||
<!-- --> | ||
<script src="../src/core.js" ></script> | ||
<script src="../src/ExcelFormulaUtilities.js" ></script> | ||
<script src="qunit/qunit.js" ></script> | ||
<script src="ExcelFormulaUtilities.test.js" ></script> | ||
|
||
</body> | ||
<!doctype html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title></title> | ||
|
||
<meta name="description" content="qunit tests for src/ExcelFormulatParser.js"> | ||
<meta name="author" content="Josh Bennett"> | ||
|
||
<link rel="stylesheet" href="qunit/qunit.css"> | ||
|
||
<style type="text/css">/*<![CDATA[*/ | ||
footer, header{display:none;} | ||
/*]]>*/</style> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<div id="container"> | ||
<header> | ||
<h1>Tests for Build</h1> | ||
</header> | ||
<div id="main" role="main"> | ||
<h1 id="qunit-header">QUnit example</h1> | ||
<h2 id="qunit-banner"></h2> | ||
<div id="qunit-testrunner-toolbar"></div> | ||
<h2 id="qunit-userAgent"></h2> | ||
<ol id="qunit-tests"></ol> | ||
<div id="qunit-fixture">test markup, will be hidden</div> | ||
</div> | ||
<footer> | ||
© copyright 2011 Josh Bennett | ||
</footer> | ||
</div> | ||
|
||
<!-- Forumla Checker from http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html --> | ||
<p>This test is taken from<a href="http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html" target="_blank">http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html</a></p> | ||
<p><input type="text" id="formula" style="width: 500px"> | ||
<input type="submit" value="parse it" onclick="window.excelFormulaUtilities.parseFormula('formula', 'tokens'); return false;"></p> | ||
<div id="tokens" style="margin-top: 5px; margin-bottom: 5px"> </div> | ||
<p><strong>Here are some sample formulas, if you want to try it out:</strong></p> | ||
<p>=IF("a"={"a","b";"c",#N/A;-1,TRUE}, "yes", "no") & " more ""test"" text"</p> | ||
<p>=+ AName- (-+-+-2^6) = {"A","B"} + @SUM(R1C1) + (@ERROR.TYPE(#VALUE!) = 2)</p> | ||
<p>=IF(R13C3>DATE(2002,1,6),0,IF(ISERROR(R[41]C[2]),0,IF(R13C3>=R[41]C[2],0, IF(AND(R[23]C[11]>=55,R[24]C[11]>=20),R53C3,0))))</p> | ||
<p>=IF(R[39]C[11]>65,R[25]C[42],ROUND((R[11]C[11]*IF(OR(AND(R[39]C[11]>=55, R[40]C[11]>=20),AND(R[40]C[11]>=20,R11C3="YES")),R[44]C[11],R[43]C[11]))+(R[14]C[11] *IF(OR(AND(R[39]C[11]>=55,R[40]C[11]>=20),AND(R[40]C[11]>=20,R11C3="YES")), R[45]C[11],R[43]C[11])),0))</p> | ||
|
||
<!-- --> | ||
<script src="../src/core.js" ></script> | ||
<script src="../src/ExcelFormulaUtilities.js" ></script> | ||
<script src="qunit/qunit.js" ></script> | ||
<script src="core.test.js" ></script> | ||
<script src="ExcelFormulaUtilities.test.js" ></script> | ||
|
||
</body> | ||
</html> |