diff options
author | Bjorn Neergaard <bjorn@neersighted.com> | 2018-11-29 14:57:35 -0700 |
---|---|---|
committer | Bjorn Neergaard <bjorn@neersighted.com> | 2018-11-29 14:57:35 -0700 |
commit | d2b0ae8108b2ee395d4eb43c49d68b322a023a30 (patch) | |
tree | bb8145e69bf1bcb8968b29cb1a68c47ceb83674d /test/test_writefile_function.vader | |
parent | ef641dda80f45cb979bc93c2513c6e10cbd8e42a (diff) | |
parent | 0a384a49d371838903d8401c5358ec60f3f4266d (diff) | |
download | ale-d2b0ae8108b2ee395d4eb43c49d68b322a023a30.zip |
Merge branch 'master' into sridhars
Diffstat (limited to 'test/test_writefile_function.vader')
-rw-r--r-- | test/test_writefile_function.vader | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/test_writefile_function.vader b/test/test_writefile_function.vader index 4e4aab53..8c8a6f17 100644 --- a/test/test_writefile_function.vader +++ b/test/test_writefile_function.vader @@ -28,7 +28,26 @@ Execute(Carriage returns should be included for ale#util#Writefile): AssertEqual \ ["first\r", "second\r", "third\r", ''], \ readfile('.newline-test', 'b') - \ + +Given(A file with extra carriage returns): + first
+ second
+ third
+ fourth + +Execute(Carriage returns should be de-depulicated): + call ale#test#SetFilename('.newline-test') + + setlocal buftype= + noautocmd :w + noautocmd :e! ++ff=dos + + call ale#util#Writefile(bufnr(''), getline(1, '$'), '.newline-test') + + AssertEqual + \ ["first\r", "second\r", "third\r", "fourth\r", ''], + \ readfile('.newline-test', 'b') + Given(A file with Unix line ending characters): first second |