diff options
| author | Marc Vertes | 2015-03-18 13:03:18 +0100 |
|---|---|---|
| committer | Tim D. Smith | 2015-03-19 23:38:28 -0700 |
| commit | bcfa7ed4f0d86734de6cd0d6022c2320d070665c (patch) | |
| tree | b016aa5905ef9e219851c511c1f88ac236f50f13 /Library | |
| parent | 8ddaf935a30322e67db1d925f9ced08fa1342c68 (diff) | |
| download | homebrew-bcfa7ed4f0d86734de6cd0d6022c2320d070665c.tar.bz2 | |
uni2ascii 4.18 (new formula)
Command line conversion tools between ASCII and UTF-8.
This was first submitted per #9437. This submission provide tests.
Closes #37830.
Signed-off-by: Tim D. Smith <git@tim-smith.us>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/uni2ascii.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Formula/uni2ascii.rb b/Library/Formula/uni2ascii.rb new file mode 100644 index 000000000..8919b04b3 --- /dev/null +++ b/Library/Formula/uni2ascii.rb @@ -0,0 +1,20 @@ +# encoding: UTF-8 +class Uni2ascii < Formula + homepage "http://billposer.org/Software/uni2ascii.html" + url "http://billposer.org/Software/Downloads/uni2ascii-4.18.tar.gz" + sha256 "9e24bb6eb2ced0a2945e2dabed5e20c419229a8bf9281c3127fa5993bfa5930e" + + def install + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + ENV["MKDIRPROG"]="mkdir -p" + system "make", "install" + end + + test do + # uni2ascii + assert_equal "0x00E9", shell_output("printf é | #{bin}/uni2ascii -q") + + # ascii2uni + assert_equal "e\n", shell_output("printf 0x65 | #{bin}/ascii2uni -q") + end +end |
