summaryrefslogtreecommitdiffstats
path: root/kio
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2013-05-08 21:43:09 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-05-08 22:00:59 +0200
commit35563d6195e9e6486bcf3e5cc3093fbee7e5e525 (patch)
treeaf9d2f0395e94b5c535283aae49da4fdd00665a2 /kio
parente4fb61e68602152119668fffdad41edb8d840017 (diff)
downloadtdelibs-35563d6195e9e6486bcf3e5cc3093fbee7e5e525.tar.gz
tdelibs-35563d6195e9e6486bcf3e5cc3093fbee7e5e525.zip
Add XZ tdeioslave
Based on KDE GIT commit bbe9e8f5 (cherry picked from commit 7f328ba6990044b0a9d510060a2dcd468cf0fd9f)
Diffstat (limited to 'kio')
-rw-r--r--kio/magic3
-rw-r--r--kio/tests/kfiltertest.cpp10
2 files changed, 13 insertions, 0 deletions
diff --git a/kio/magic b/kio/magic
index c12cec4ba..6356a04c1 100644
--- a/kio/magic
+++ b/kio/magic
@@ -484,6 +484,9 @@
# ACE archive
7 string **ACE** application/x-ace
+# XZ
+0 string \0fd\037\07a\058\05a\000 application/x-xz
+
#------------------------------------------------------------------------------
# frame: file(1) magic for FrameMaker files
diff --git a/kio/tests/kfiltertest.cpp b/kio/tests/kfiltertest.cpp
index e070418e4..a2355f625 100644
--- a/kio/tests/kfiltertest.cpp
+++ b/kio/tests/kfiltertest.cpp
@@ -94,11 +94,14 @@ int main()
getcwd( currentdir, PATH_MAX );
TQString pathgz = TQFile::decodeName(currentdir) + "/test.gz";
TQString pathbz2 = TQFile::decodeName(currentdir) + "/test.bz2";
+ TQString pathxz = TQFile::decodeName(currentdir) + "/test.xz";
kdDebug() << " -- test_block_write gzip -- " << endl;
test_block_write(pathgz);
kdDebug() << " -- test_block_write bzip2 -- " << endl;
test_block_write(pathbz2);
+ kdDebug() << " -- test_block_write xz -- " << endl;
+ test_block_write(pathxz);
kdDebug() << " -- test_block gzip -- " << endl;
test_block(pathgz);
@@ -114,5 +117,12 @@ int main()
kdDebug() << " -- test_textstream bzip2 -- " << endl;
test_textstream(pathbz2);
+ kdDebug() << " -- test_block xz -- " << endl;
+ test_block(pathxz);
+ kdDebug() << " -- test_getch xz -- " << endl;
+ test_getch(pathxz);
+ kdDebug() << " -- test_textstream xz -- " << endl;
+ test_textstream(pathxz);
+
return 0;
}