Skip to content

Commit

Permalink
FLUID-4293: fluid.stringTemplate multiple token replacement
Browse files Browse the repository at this point in the history
Modifying fixing the last test
  • Loading branch information
lahabana committed Jul 27, 2011
1 parent c45a809 commit 7fad423
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webapp/tests/framework-tests/core/js/FluidJSTests.js
Expand Up @@ -322,19 +322,19 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
});

fluidJSTests.test("stringTemplate: special character [] and ()", function () {
var template = "Paused at: %() of %[] files (%file[] of %[]file)";
var template = "Paused at: %() of %[] files (%file[] of %file)";

var data = {
"()": 12,
"[]": 14,
"file[]": "100 Kb",
"[]file": "12000 Gb"
"file": "12000 Gb"
};

var expected = "Paused at: " + data["()"] +
" of " + data["[]"] +
" files (" + data["file[]"] +
" of " + data["[]file"] + ")";
" of " + data["file"] + ")";


var result = fluid.stringTemplate(template, data);
Expand Down

0 comments on commit 7fad423

Please sign in to comment.