Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f15023d3
Kaydet (Commit)
f15023d3
authored
Mar 16, 2012
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
do not let a unittest create temp files in the current directory
üst
ccd8e23b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
tests.cxx
sdext/source/pdfimport/test/tests.cxx
+10
-12
No files found.
sdext/source/pdfimport/test/tests.cxx
Dosyayı görüntüle @
f15023d3
...
@@ -596,15 +596,14 @@ namespace
...
@@ -596,15 +596,14 @@ namespace
pdfi
::
PDFIRawAdaptor
aAdaptor
(
impl_getComponentContext
()
);
pdfi
::
PDFIRawAdaptor
aAdaptor
(
impl_getComponentContext
()
);
aAdaptor
.
setTreeVisitorFactory
(
createDrawTreeVisitorFactory
()
);
aAdaptor
.
setTreeVisitorFactory
(
createDrawTreeVisitorFactory
()
);
::
rtl
::
OUString
aURL
,
aAbsURL
,
aBaseURL
;
::
rtl
::
OUString
tempFileURL
;
osl_getFileURLFromSystemPath
(
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"pdfi_unittest_draw.xml"
))).
pData
,
CPPUNIT_ASSERT
(
osl
::
File
::
createTempFile
(
NULL
,
NULL
,
&
tempFileURL
)
==
osl
::
File
::
E_None
);
&
aURL
.
pData
);
osl
::
File
::
remove
(
tempFileURL
);
// FIXME the below apparently fails silently if the file already exists
osl_getProcessWorkingDir
(
&
aBaseURL
.
pData
);
osl_getAbsoluteFileURL
(
aBaseURL
.
pData
,
aURL
.
pData
,
&
aAbsURL
.
pData
);
CPPUNIT_ASSERT_MESSAGE
(
"Exporting to ODF"
,
CPPUNIT_ASSERT_MESSAGE
(
"Exporting to ODF"
,
aAdaptor
.
odfConvert
(
getURLFromSrc
(
"/sdext/source/pdfimport/test/testinput.pdf"
),
aAdaptor
.
odfConvert
(
getURLFromSrc
(
"/sdext/source/pdfimport/test/testinput.pdf"
),
new
OutputWrap
(
aAbs
URL
),
new
OutputWrap
(
tempFile
URL
),
NULL
));
NULL
));
osl
::
File
::
remove
(
tempFileURL
);
}
}
void
testOdfWriterExport
()
void
testOdfWriterExport
()
...
@@ -612,15 +611,14 @@ namespace
...
@@ -612,15 +611,14 @@ namespace
pdfi
::
PDFIRawAdaptor
aAdaptor
(
impl_getComponentContext
()
);
pdfi
::
PDFIRawAdaptor
aAdaptor
(
impl_getComponentContext
()
);
aAdaptor
.
setTreeVisitorFactory
(
createWriterTreeVisitorFactory
()
);
aAdaptor
.
setTreeVisitorFactory
(
createWriterTreeVisitorFactory
()
);
::
rtl
::
OUString
aURL
,
aAbsURL
,
aBaseURL
;
::
rtl
::
OUString
tempFileURL
;
osl_getFileURLFromSystemPath
(
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"pdfi_unittest_writer.xml"
))).
pData
,
CPPUNIT_ASSERT
(
osl
::
File
::
createTempFile
(
NULL
,
NULL
,
&
tempFileURL
)
==
osl
::
File
::
E_None
);
&
aURL
.
pData
);
osl
::
File
::
remove
(
tempFileURL
);
// FIXME the below apparently fails silently if the file already exists
osl_getProcessWorkingDir
(
&
aBaseURL
.
pData
);
osl_getAbsoluteFileURL
(
aBaseURL
.
pData
,
aURL
.
pData
,
&
aAbsURL
.
pData
);
CPPUNIT_ASSERT_MESSAGE
(
"Exporting to ODF"
,
CPPUNIT_ASSERT_MESSAGE
(
"Exporting to ODF"
,
aAdaptor
.
odfConvert
(
getURLFromSrc
(
"/sdext/source/pdfimport/test/testinput.pdf"
),
aAdaptor
.
odfConvert
(
getURLFromSrc
(
"/sdext/source/pdfimport/test/testinput.pdf"
),
new
OutputWrap
(
aAbs
URL
),
new
OutputWrap
(
tempFile
URL
),
NULL
));
NULL
));
osl
::
File
::
remove
(
tempFileURL
);
}
}
CPPUNIT_TEST_SUITE
(
PDFITest
);
CPPUNIT_TEST_SUITE
(
PDFITest
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment