forked from scottgonzalez/figlet-js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use unknown character character. Add test framework, test for unknown…
… character character.
- Loading branch information
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "figlet-js", | ||
"version": "0.0.0", | ||
"description": "Figlet is a program for making large letters out of ordinary text.", | ||
"main": "figlet-node.js", | ||
"scripts": { | ||
"test": "nodeunit test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/scottgonzalez/figlet-js.git" | ||
}, | ||
"author": "Scott Gonzalez", | ||
"license": "MIT", | ||
"readmeFilename": "readme.md", | ||
"bugs": { | ||
"url": "https://github.com/scottgonzalez/figlet-js/issues" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"nodeunit": "~0.8.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var figlet = require("../figlet-node.js").Figlet; | ||
|
||
module.exports = { | ||
|
||
// Figlet should replace uknown characters in the font with an unknown character character - a space character | ||
// TODO: Expose unknown character character as an option? | ||
"Test render unknown characters": function (test) { | ||
|
||
test.expect(2); | ||
|
||
figlet.write("(ノಠ益ಠ)ノ彡", "graffiti", function (er, text) { | ||
test.ifError(er); | ||
test.equal(" ___ ___ \n / / \\ \\ \n / / \\ \\ \n ( ( ) ) \n \\ \\ / / \n \\__\\ /__/ \n", text); | ||
test.done(); | ||
}); | ||
} | ||
}; |