mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 16:29:20 +00:00
Fix Path unittests on Windows after raw_fd_ostream changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216422 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d1f8b1b21
commit
64bb4a64e7
@ -549,27 +549,27 @@ TEST_F(FileSystemTest, Magic) {
|
||||
#ifdef LLVM_ON_WIN32
|
||||
TEST_F(FileSystemTest, CarriageReturn) {
|
||||
SmallString<128> FilePathname(TestDirectory);
|
||||
std::string ErrMsg;
|
||||
std::error_code EC;
|
||||
path::append(FilePathname, "test");
|
||||
|
||||
{
|
||||
raw_fd_ostream File(FilePathname, ErrMsg, sys::fs::F_Text);
|
||||
EXPECT_EQ(ErrMsg, "");
|
||||
raw_fd_ostream File(FilePathname, EC, sys::fs::F_Text);
|
||||
ASSERT_NO_ERROR(EC);
|
||||
File << '\n';
|
||||
}
|
||||
{
|
||||
auto Buf = MemoryBuffer::getFile(FilePathname);
|
||||
auto Buf = MemoryBuffer::getFile(FilePathname.str());
|
||||
EXPECT_TRUE((bool)Buf);
|
||||
EXPECT_EQ(Buf.get()->getBuffer(), "\r\n");
|
||||
}
|
||||
|
||||
{
|
||||
raw_fd_ostream File(FilePathname, ErrMsg, sys::fs::F_None);
|
||||
EXPECT_EQ(ErrMsg, "");
|
||||
raw_fd_ostream File(FilePathname, EC, sys::fs::F_None);
|
||||
ASSERT_NO_ERROR(EC);
|
||||
File << '\n';
|
||||
}
|
||||
{
|
||||
auto Buf = MemoryBuffer::getFile(FilePathname);
|
||||
auto Buf = MemoryBuffer::getFile(FilePathname.str());
|
||||
EXPECT_TRUE((bool)Buf);
|
||||
EXPECT_EQ(Buf.get()->getBuffer(), "\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user