diff options
Diffstat (limited to 'Library/Formula/dos2unix.rb')
| -rw-r--r-- | Library/Formula/dos2unix.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Formula/dos2unix.rb b/Library/Formula/dos2unix.rb index d03a09d12..7bfba04dd 100644 --- a/Library/Formula/dos2unix.rb +++ b/Library/Formula/dos2unix.rb @@ -22,4 +22,13 @@ class Dos2unix < Formula "LDFLAGS_EXTRA=-L#{gettext.lib} -lintl", "install" end + + test do + (testpath/'dosfile.txt').write("File with CRLFs\r\nThey will be converted") + system "#{bin}/dos2unix", 'dosfile.txt' + open('dosfile.txt') do |f| + converted = f.read(64) + fail if converted.include?("\r") + end + end end |
