Skip to content

Commit

Permalink
merged tests for dev into 1 page
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbtn committed Aug 15, 2011
1 parent b999070 commit d81835b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 94 deletions.
41 changes: 0 additions & 41 deletions test/core.test.html

This file was deleted.

107 changes: 54 additions & 53 deletions test/ExcelFormulaUtilities.test.html → test/dev.test.html
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>
&copy; 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">&nbsp;</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") &amp;&nbsp;&nbsp; " &nbsp;more ""test"" text"</p>
<p>=+ AName- (-+-+-2^6) = {"A","B"} + @SUM(R1C1) + (@ERROR.TYPE(#VALUE!) = 2)</p>
<p>=IF(R13C3&gt;DATE(2002,1,6),0,IF(ISERROR(R[41]C[2]),0,IF(R13C3&gt;=R[41]C[2],0, IF(AND(R[23]C[11]&gt;=55,R[24]C[11]&gt;=20),R53C3,0))))</p>
<p>=IF(R[39]C[11]&gt;65,R[25]C[42],ROUND((R[11]C[11]*IF(OR(AND(R[39]C[11]&gt;=55, R[40]C[11]&gt;=20),AND(R[40]C[11]&gt;=20,R11C3="YES")),R[44]C[11],R[43]C[11]))+(R[14]C[11] *IF(OR(AND(R[39]C[11]&gt;=55,R[40]C[11]&gt;=20),AND(R[40]C[11]&gt;=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>
&copy; 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">&nbsp;</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") &amp;&nbsp;&nbsp; " &nbsp;more ""test"" text"</p>
<p>=+ AName- (-+-+-2^6) = {"A","B"} + @SUM(R1C1) + (@ERROR.TYPE(#VALUE!) = 2)</p>
<p>=IF(R13C3&gt;DATE(2002,1,6),0,IF(ISERROR(R[41]C[2]),0,IF(R13C3&gt;=R[41]C[2],0, IF(AND(R[23]C[11]&gt;=55,R[24]C[11]&gt;=20),R53C3,0))))</p>
<p>=IF(R[39]C[11]&gt;65,R[25]C[42],ROUND((R[11]C[11]*IF(OR(AND(R[39]C[11]&gt;=55, R[40]C[11]&gt;=20),AND(R[40]C[11]&gt;=20,R11C3="YES")),R[44]C[11],R[43]C[11]))+(R[14]C[11] *IF(OR(AND(R[39]C[11]&gt;=55,R[40]C[11]&gt;=20),AND(R[40]C[11]&gt;=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>

0 comments on commit d81835b

Please sign in to comment.