dump.html revision bd4e7bf54bb629b039ba9e22ba57cf09cddce482
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<html>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<head>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<title>YUI dump Tests</title>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore</head>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<body class="yui-skin-sam">
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<h1>dump Tests</h1>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<p><input type="button" value="Run Tests" id="btnRun" disabled="true" /></p>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<script type="text/javascript" src="/build/yui/yui.js"></script>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore<script type="text/javascript">
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore(function() {
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore YUI({
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore base: "/build/",
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore filter: "debug",
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore useConsole: true,
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore // logInclude: ['event', 'test']
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore //logExclude: ['Dom', 'Selector', 'Node', 'attribute']
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore logExclude: {Dom:true,
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Selector:true, Node:true, attribute:true, event:true, base:true}
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore }).use("dump", "test", "console", "event-custom", function(Y) {
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore var button = Y.get('#btnRun'),
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Assert = Y.Assert,
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore ObjectAssert = Y.ObjectAssert;
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore // Set up the page
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore button.set("disabled", false);
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Y.on("click", function() {
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Y.Test.Runner.run();
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore }, button);
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore var myConsole = new Y.Console().render();
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore var testdump= new Y.Test.Case({
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore name: "dump tests",
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore test_dump: function() {
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Assert.areEqual("0", Y.Lang.dump(0));
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Assert.areEqual("null", Y.Lang.dump(null));
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Assert.areEqual("false", Y.Lang.dump(false));
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore // Other types tested in substitute
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore }
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore });
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Y.Test.Runner.add(testdump);
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore Y.Test.Runner.run();
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore });
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore})();
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore</script>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore</body>
bd4e7bf54bb629b039ba9e22ba57cf09cddce482Adam Moore</html>