Sha256: 138e3bb803a37dba190003b9eb272c3e8e1e5dd6656ccf86d23b22b9a0f83c17
Contents?: true
Size: 1.18 KB
Versions: 25
Compression:
Stored size: 1.18 KB
Contents
var CssClassNameTest = TestCase('CssClassName'); CssClassNameTest.prototype.setUp = function() { this.sanitizer_ = new webfont.CssClassName(); }; CssClassNameTest.prototype.testSanitizeSpacesInName = function() { var result = this.sanitizer_.sanitize(' My Family '); assertEquals('myfamily', result); }; CssClassNameTest.prototype.testSanitizeNumbersInName = function() { var result = this.sanitizer_.sanitize('99 My Family 99'); assertEquals('99myfamily99', result); }; CssClassNameTest.prototype.testSanitizeOtherChars = function() { var result = this.sanitizer_.sanitize('_My+Family!-'); assertEquals('myfamily', result); }; CssClassNameTest.prototype.testBuildManyParts = function() { var result = this.sanitizer_.build('pre_', 'My Family', '_post'); assertEquals('pre-myfamily-post', result); }; CssClassNameTest.prototype.testBuildSomeParts = function() { var result = this.sanitizer_.build('pre!', 'My Family'); assertEquals('pre-myfamily', result); }; CssClassNameTest.prototype.testBuildOtherJoinChar = function() { this.sanitizer_ = new webfont.CssClassName('_'); var result = this.sanitizer_.build('pre', 'My Family'); assertEquals('pre_myfamily', result); };
Version data entries
25 entries across 25 versions & 1 rubygems