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
174a1d3c
Kaydet (Commit)
174a1d3c
authored
Nis 02, 2012
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix very ... uhm ... inventive and confusing use of empty string
üst
0c08a84c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
24 deletions
+11
-24
osl_Security.cxx
sal/qa/osl/security/osl_Security.cxx
+8
-8
osl_Security_Const.h
sal/qa/osl/security/osl_Security_Const.h
+3
-16
No files found.
sal/qa/osl/security/osl_Security.cxx
Dosyayı görüntüle @
174a1d3c
...
@@ -129,12 +129,12 @@ namespace osl_Security
...
@@ -129,12 +129,12 @@ namespace osl_Security
SAL_CPPUNIT_TEST_SUITE
(
logonUser
);
SAL_CPPUNIT_TEST_SUITE
(
logonUser
);
if
(
!
aStringForward
.
equals
(
aNullUrl
)
&&
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
!=
-
1
&&
(
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
==
aStringForward
.
lastIndexOf
(
(
sal_Unicode
)
' '
)
)
)
if
(
!
aStringForward
.
isEmpty
()
&&
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
!=
-
1
&&
(
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
==
aStringForward
.
lastIndexOf
(
(
sal_Unicode
)
' '
)
)
)
/// if user name and passwd are forwarded
/// if user name and passwd are forwarded
{
{
CPPUNIT_TEST
(
logonUser_user_pwd
);
CPPUNIT_TEST
(
logonUser_user_pwd
);
}
}
if
(
!
aStringForward
.
equals
(
aNullUrl
)
&&
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
!=
-
1
&&
(
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
!=
aStringForward
.
lastIndexOf
(
(
sal_Unicode
)
' '
)
)
)
if
(
!
aStringForward
.
isEmpty
()
&&
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
!=
-
1
&&
(
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
!=
aStringForward
.
lastIndexOf
(
(
sal_Unicode
)
' '
)
)
)
/// if user name and passwd and file server are forwarded
/// if user name and passwd and file server are forwarded
{
{
CPPUNIT_TEST
(
logonUser_user_pwd_server
);
CPPUNIT_TEST
(
logonUser_user_pwd_server
);
...
@@ -597,31 +597,31 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
...
@@ -597,31 +597,31 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
t_print
(
"#
\n
#Retrived system information is below:
\n
"
);
t_print
(
"#
\n
#Retrived system information is below:
\n
"
);
t_print
(
"Computer Name: "
);
t_print
(
"Computer Name: "
);
if
(
strComputerName
==
aNullUrl
)
if
(
strComputerName
.
isEmpty
()
)
t_print
(
"Not retrived
\n
"
);
t_print
(
"Not retrived
\n
"
);
else
else
printUString
(
strComputerName
);
printUString
(
strComputerName
);
t_print
(
"Current User Name: "
);
t_print
(
"Current User Name: "
);
if
(
strUserName
==
aNullUrl
)
if
(
strUserName
.
isEmpty
()
)
t_print
(
"Not retrived
\n
"
);
t_print
(
"Not retrived
\n
"
);
else
else
printUString
(
strUserName
);
printUString
(
strUserName
);
t_print
(
"Current User Home Directory:"
);
t_print
(
"Current User Home Directory:"
);
if
(
strHomeDirectory
==
aNullUrl
)
if
(
strHomeDirectory
.
isEmpty
()
)
t_print
(
"Not retrived
\n
"
);
t_print
(
"Not retrived
\n
"
);
else
else
printUString
(
strHomeDirectory
);
printUString
(
strHomeDirectory
);
t_print
(
"Current Config Directory: "
);
t_print
(
"Current Config Directory: "
);
if
(
strConfigDirectory
==
aNullUrl
)
if
(
strConfigDirectory
.
isEmpty
()
)
t_print
(
"Not retrived
\n
"
);
t_print
(
"Not retrived
\n
"
);
else
else
printUString
(
strConfigDirectory
);
printUString
(
strConfigDirectory
);
t_print
(
"Current UserID: "
);
t_print
(
"Current UserID: "
);
if
(
strUserID
==
aNullUrl
)
if
(
strUserID
.
isEmpty
()
)
t_print
(
"Not retrived
\n
"
);
t_print
(
"Not retrived
\n
"
);
else
else
printUString
(
strUserID
);
printUString
(
strUserID
);
...
@@ -634,7 +634,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
...
@@ -634,7 +634,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
/// get and display forwarded text if available.
/// get and display forwarded text if available.
aStringForward
=
::
rtl
::
OUString
::
createFromAscii
(
parameters
.
getCommandLine
().
c_str
()
);
aStringForward
=
::
rtl
::
OUString
::
createFromAscii
(
parameters
.
getCommandLine
().
c_str
()
);
if
(
!
aStringForward
.
equals
(
aNullUrl
)
&&
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
!=
-
1
)
if
(
!
aStringForward
.
isEmpty
(
)
&&
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
)
!=
-
1
)
{
{
sal_Int32
nFirstSpacePoint
=
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
);;
sal_Int32
nFirstSpacePoint
=
aStringForward
.
indexOf
(
(
sal_Unicode
)
' '
);;
sal_Int32
nLastSpacePoint
=
aStringForward
.
lastIndexOf
(
(
sal_Unicode
)
' '
);;
sal_Int32
nLastSpacePoint
=
aStringForward
.
lastIndexOf
(
(
sal_Unicode
)
' '
);;
...
...
sal/qa/osl/security/osl_Security_Const.h
Dosyayı görüntüle @
174a1d3c
...
@@ -59,22 +59,9 @@
...
@@ -59,22 +59,9 @@
#define BUFSIZE 1024
#define BUFSIZE 1024
const
char
pTestString
[
17
]
=
"Sun Microsystems"
;
const
char
pTestString
[
17
]
=
"Sun Microsystems"
;
::
rtl
::
OUString
aLogonUser
,
aLogonPasswd
,
aFileServer
,
aStringForward
;
#define OSLTEST_DECLARE_USTRING( str_name, str_value ) \
::
rtl
::
OUString
strUserName
,
strComputerName
,
strHomeDirectory
;
::rtl::OUString a##str_name = rtl::OUString::createFromAscii( str_value )
::
rtl
::
OUString
strConfigDirectory
,
strUserID
;
//------------------------------------------------------------------------
// condition names
//------------------------------------------------------------------------
// Intentionally different from the aNullURL in osl_File_Const.h to avoid
// duplicate symbols as all the unit tests here get linked together for iOS...
OSLTEST_DECLARE_USTRING
(
NullUrl
,
""
);
::
rtl
::
OUString
aLogonUser
(
aNullUrl
),
aLogonPasswd
(
aNullUrl
),
aFileServer
(
aNullUrl
),
aStringForward
(
aNullUrl
);
::
rtl
::
OUString
strUserName
(
aNullUrl
)
,
strComputerName
(
aNullUrl
)
,
strHomeDirectory
(
aNullUrl
);
::
rtl
::
OUString
strConfigDirectory
(
aNullUrl
),
strUserID
(
aNullUrl
);
sal_Bool
isAdmin
=
sal_False
;
sal_Bool
isAdmin
=
sal_False
;
...
...
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