Commit 3d14c229 authored by GoshaZotov's avatar GoshaZotov

add tests for ISFORMULA

parent 422954f6
......@@ -5398,6 +5398,31 @@ $( function () {
} );
test( "Test: \"ISFORMULA\"", function () {
ws.getRange2( "C150" ).setValue( "=TODAY()" );
ws.getRange2( "C151" ).setValue( "7" );
ws.getRange2( "C152" ).setValue( "Hello, world!" );
ws.getRange2( "C153" ).setValue( "=3/0" );
oParser = new parserFormula( "ISFORMULA(C150)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().toString(), "TRUE" );
oParser = new parserFormula( "ISFORMULA(C151)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().toString(), "FALSE" );
oParser = new parserFormula( "ISFORMULA(C152)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().toString(), "FALSE" );
oParser = new parserFormula( "ISFORMULA(C153)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().toString(), "TRUE" );
} );
test( "Test: \"IFNA\"", function () {
oParser = new parserFormula( 'IFNA(MATCH(30,B1:B5,0),"Not found")', "A2", ws );
......
......@@ -254,6 +254,7 @@
cISFORMULA.prototype.constructor = cISFORMULA;
cISFORMULA.prototype.argumentsMin = 1;
cISFORMULA.prototype.argumentsMax = 1;
cISFORMULA.prototype.isXLFN = true;
cISFORMULA.prototype.Calculate = function (arg) {
//есть различия в поведении этой формулы для ms и lo(для нескольких ячеек с данными)
var arg0 = arg[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment