@ -290,7 +290,7 @@ int main(int argc, char **argv)
TQCString qtdir = getenv ( " QTDIR " ) ;
TQCString qtdir = getenv ( " QTDIR " ) ;
TQCString home = getenv ( " HOME " ) ;
TQCString home = getenv ( " HOME " ) ;
TQCString k dehome = getenv ( " TDEHOME " ) ;
TQCString t dehome = getenv ( " TDEHOME " ) ;
filter ( " $SOMEVAR/tdelibs/kio " , 0 , KURIFilterData : : ERROR ) ; // note: this dir doesn't exist...
filter ( " $SOMEVAR/tdelibs/kio " , 0 , KURIFilterData : : ERROR ) ; // note: this dir doesn't exist...
filter ( " $ETC/passwd " , " /etc/passwd " , KURIFilterData : : LOCAL_FILE ) ;
filter ( " $ETC/passwd " , " /etc/passwd " , KURIFilterData : : LOCAL_FILE ) ;
@ -298,32 +298,32 @@ int main(int argc, char **argv)
filter ( " http://www.kde.org/$USER " , " http://www.kde.org/$USER " , KURIFilterData : : NET_PROTOCOL ) ; // no expansion
filter ( " http://www.kde.org/$USER " , " http://www.kde.org/$USER " , KURIFilterData : : NET_PROTOCOL ) ; // no expansion
// Assume the default (~/.kde) if
// Assume the default (~/.kde) if
if ( k dehome. isEmpty ( ) )
if ( t dehome. isEmpty ( ) )
{
{
k dehome + = " $HOME/.kde " ;
t dehome + = " $HOME/.kde " ;
setenv ( " TDEHOME " , k dehome. data ( ) , 0 ) ;
setenv ( " TDEHOME " , t dehome. data ( ) , 0 ) ;
}
}
filter ( " $TDEHOME/share " , k dehome+ " /share " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/share " , t dehome+ " /share " , KURIFilterData : : LOCAL_DIR ) ;
KStandardDirs : : makeDir ( k dehome+ " /a+plus " ) ;
KStandardDirs : : makeDir ( t dehome+ " /a+plus " ) ;
filter ( " $TDEHOME/a+plus " , k dehome+ " /a+plus " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/a+plus " , t dehome+ " /a+plus " , KURIFilterData : : LOCAL_DIR ) ;
// BR 27788
// BR 27788
KStandardDirs : : makeDir ( k dehome+ " /share/Dir With Space " ) ;
KStandardDirs : : makeDir ( t dehome+ " /share/Dir With Space " ) ;
filter ( " $TDEHOME/share/Dir With Space " , k dehome+ " /share/Dir With Space " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/share/Dir With Space " , t dehome+ " /share/Dir With Space " , KURIFilterData : : LOCAL_DIR ) ;
// support for name filters (BR 93825)
// support for name filters (BR 93825)
filter ( " $TDEHOME/*.txt " , k dehome+ " /*.txt " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/*.txt " , t dehome+ " /*.txt " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/[a-b]*.txt " , k dehome+ " /[a-b]*.txt " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/[a-b]*.txt " , t dehome+ " /[a-b]*.txt " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/a?c.txt " , k dehome+ " /a?c.txt " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/a?c.txt " , t dehome+ " /a?c.txt " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/?c.txt " , k dehome+ " /?c.txt " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/?c.txt " , t dehome+ " /?c.txt " , KURIFilterData : : LOCAL_DIR ) ;
// but let's check that a directory with * in the name still works
// but let's check that a directory with * in the name still works
KStandardDirs : : makeDir ( k dehome+ " /share/Dir*With*Stars " ) ;
KStandardDirs : : makeDir ( t dehome+ " /share/Dir*With*Stars " ) ;
filter ( " $TDEHOME/share/Dir*With*Stars " , k dehome+ " /share/Dir*With*Stars " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/share/Dir*With*Stars " , t dehome+ " /share/Dir*With*Stars " , KURIFilterData : : LOCAL_DIR ) ;
KStandardDirs : : makeDir ( k dehome+ " /share/Dir?QuestionMark " ) ;
KStandardDirs : : makeDir ( t dehome+ " /share/Dir?QuestionMark " ) ;
filter ( " $TDEHOME/share/Dir?QuestionMark " , k dehome+ " /share/Dir?QuestionMark " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/share/Dir?QuestionMark " , t dehome+ " /share/Dir?QuestionMark " , KURIFilterData : : LOCAL_DIR ) ;
KStandardDirs : : makeDir ( k dehome+ " /share/Dir[Bracket " ) ;
KStandardDirs : : makeDir ( t dehome+ " /share/Dir[Bracket " ) ;
filter ( " $TDEHOME/share/Dir[Bracket " , k dehome+ " /share/Dir[Bracket " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $TDEHOME/share/Dir[Bracket " , t dehome+ " /share/Dir[Bracket " , KURIFilterData : : LOCAL_DIR ) ;
filter ( " $HOME/$TDEDIR/tdebase/kcontrol/ebrowsing " , 0 , KURIFilterData : : ERROR ) ;
filter ( " $HOME/$TDEDIR/tdebase/kcontrol/ebrowsing " , 0 , KURIFilterData : : ERROR ) ;
filter ( " $1/$2/$3 " , " http://www.google.com/search?q=$1/$2/$3&ie=UTF-8&oe=UTF-8 " , KURIFilterData : : NET_PROTOCOL ) ; // can be used as bogus or valid test. Currently triggers default search, i.e. google
filter ( " $1/$2/$3 " , " http://www.google.com/search?q=$1/$2/$3&ie=UTF-8&oe=UTF-8 " , KURIFilterData : : NET_PROTOCOL ) ; // can be used as bogus or valid test. Currently triggers default search, i.e. google
@ -349,12 +349,12 @@ int main(int argc, char **argv)
filter ( sc . sprintf ( " gg%cпр йве т " , delimiter ) /* greetings in russian utf-8*/ , " http://www.google.com/search?q=%D0%BF%D1%80%D0%B9%D0%B2%D0%B5%D1%82&ie=UTF-8&oe=UTF-8 " , KURIFilterData : : NET_PROTOCOL ) ;
filter ( sc . sprintf ( " gg%cпр йве т " , delimiter ) /* greetings in russian utf-8*/ , " http://www.google.com/search?q=%D0%BF%D1%80%D0%B9%D0%B2%D0%B5%D1%82&ie=UTF-8&oe=UTF-8 " , KURIFilterData : : NET_PROTOCOL ) ;
// Absolute Path tests for kshorturifilter
// Absolute Path tests for kshorturifilter
filter ( " ./ " , k dehome+ " /share " , KURIFilterData : : LOCAL_DIR , " kshorturifilter " , k dehome+ " /share/ " ) ; // cleanDirPath removes the trailing slash
filter ( " ./ " , t dehome+ " /share " , KURIFilterData : : LOCAL_DIR , " kshorturifilter " , t dehome+ " /share/ " ) ; // cleanDirPath removes the trailing slash
filter ( " ../ " , k dehome, KURIFilterData : : LOCAL_DIR , " kshorturifilter " , k dehome+ " /share " ) ;
filter ( " ../ " , t dehome, KURIFilterData : : LOCAL_DIR , " kshorturifilter " , t dehome+ " /share " ) ;
filter ( " config " , k dehome+ " /share/config " , KURIFilterData : : LOCAL_DIR , " kshorturifilter " , k dehome+ " /share " ) ;
filter ( " config " , t dehome+ " /share/config " , KURIFilterData : : LOCAL_DIR , " kshorturifilter " , t dehome+ " /share " ) ;
// Clean up
// Clean up
KIO : : NetAccess : : del ( k dehome, 0 ) ;
KIO : : NetAccess : : del ( t dehome, 0 ) ;
kdDebug ( ) < < " All tests done. Go home... " < < endl ;
kdDebug ( ) < < " All tests done. Go home... " < < endl ;
return 0 ;
return 0 ;