UNPKG

zpt

Version:

Zenon Page Templates - JS (ZPT-JS)

48 lines (43 loc) 2.58 kB
<!DOCTYPE html> <html lang="es"> <head> <meta charset="utf-8"> <title>Format tests</title> <link rel="stylesheet" href="/node_modules/qunit/qunit/qunit.css"> <script src="http://127.0.0.1:9966/format.js" defer></script> </head> <body> <div id="qunit"></div> <div id="qunit-fixture"></div> <p> Simple format </p> <ol id="group1"> <li>format: lowerCase 'Test' should be <span id="t1-1" data-content="format: lowerCase 'Test'">a lowercase</span></li> <li>format: upperCase 'Test' should be <span id="t1-2" data-content="format: upperCase 'Test'">an uppercase</span></li> <li>format: lowerCase aString should be <span id="t1-3" data-define="aString 'Variable Test'" data-content="format: lowerCase aString">a lowercase</span></li> <li>format: upperCase aString should be <span id="t1-4" data-define="aString 'Variable Test'" data-content="format: upperCase aString">an uppercase</span></li> </ol> <p> Format with arguments </p> <ol id="group2"> <li>format: fix 1.371 2 should be <span id="t2-1" data-content="format: fix 1.377 2">a number fixed to 2</span></li> <li>format: fix number fixTo should be <span id="t2-2" data-define="fixTo 1; number 1.6341" data-content="format: fix number fixTo">a number fixed to 1</span></li> <li>format: fix (/: 1 3) 2 should be <span id="t2-3" data-content="format: fix (/: 1 3) 2">a number fixed to 2</span></li> </ol> <p> Custom formatters </p> <ol id="group3"> <li>format: customFormatter 150 should be <span id="t3-1" data-content="format: customFormatter 150">money!</span></li> <li>format: customFormatter number should be <span id="t3-2" data-define="number 225" data-content="format: customFormatter number">money!</span></li> <li>format: customFormatterName number should be <span id="t3-3" data-define="number 1225; customFormatterName 'customFormatter'" data-content="format: customFormatterName number">money!</span></li> </ol> </body> </html>