diff options
| -rw-r--r-- | Library/Formula/dos2unix.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Library/Formula/dos2unix.rb b/Library/Formula/dos2unix.rb index 5ec6a3543..68a8862d8 100644 --- a/Library/Formula/dos2unix.rb +++ b/Library/Formula/dos2unix.rb @@ -24,11 +24,10 @@ class Dos2unix < Formula 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 + path = testpath/"test.txt" + path.write "foo\r\nbar\r\n" + + system "#{bin}/dos2unix", path + assert_equal "foo\nbar\n", path.read end end |
