[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kio/tests
From:       David Faure <faure () kde ! org>
Date:       2009-02-16 18:37:45
Message-ID: 1234809465.139686.7115.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 927065 by dfaure:

Add "Dir With#Spaces/" to the test dir, and fix the test to compare with prettyUrl. \
Works - no bug in KUrlCompletion.


 M  +8 -6      kurlcompletiontest.cpp  


--- trunk/KDE/kdelibs/kio/tests/kurlcompletiontest.cpp #927064:927065
@@ -53,11 +53,12 @@
     m_completion = new KUrlCompletion;
     m_tempDir = new KTempDir;
     m_dir = m_tempDir->name();
+    Q_ASSERT( m_dir.endsWith( "/" ) );
+    m_dir += "Dir With#Spaces/";
+    QDir().mkdir(m_dir);
     kDebug() << "m_dir=" << m_dir;
-    Q_ASSERT( m_dir.endsWith( "/" ) );
     if ( setDirAsURL ) {
-        KUrl d; d.setPath( m_dir );
-        m_completion->setDir( d.url() );
+        m_completion->setDir( KUrl(m_dir).url() );
     } else {
         m_completion->setDir( m_dir );
     }
@@ -155,9 +156,10 @@
     QStringList comp1all = m_completion->allMatches();
     kDebug() << comp1all;
     assert( comp1all.count() == 3 );
-    assert( comp1all.contains( m_dirURL.url() + "file1" ) );
-    assert( comp1all.contains( m_dirURL.url() + "file_subdir/" ) );
-    QString filehash = m_dirURL.url() + "file%23a";
+    kDebug() << "Looking for" << m_dirURL.prettyUrl() + "file1";
+    assert( comp1all.contains( m_dirURL.prettyUrl() + "file1" ) );
+    assert( comp1all.contains( m_dirURL.prettyUrl() + "file_subdir/" ) );
+    QString filehash = m_dirURL.prettyUrl() + "file%23a";
     assert( comp1all.contains( filehash ) );
     QString filehashPath = m_completion->replacedPath( filehash ); // note that it \
returns a path!!  kDebug() << filehashPath;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic