Author: stephan
Date: 2007-02-19 10:21:18 +0000 (Mon, 19 Feb 2007)
New Revision: 24995
Added:
squeeze/trunk/tests/zip/test-add.c
squeeze/trunk/tests/zip/test-extract.c
squeeze/trunk/tests/zip/test-refresh.c
squeeze/trunk/tests/zip/test-remove.c
squeeze/trunk/tests/zip/test-zip-add.pl
squeeze/trunk/tests/zip/test-zip-extract.pl
squeeze/trunk/tests/zip/test-zip-refresh.pl
squeeze/trunk/tests/zip/test-zip-remove.pl
Removed:
squeeze/trunk/tests/zip/test-zip-add.c
squeeze/trunk/tests/zip/test-zip-extract.c
squeeze/trunk/tests/zip/test-zip-refresh.c
squeeze/trunk/tests/zip/test-zip-remove.c
Modified:
squeeze/trunk/tests/zip/Makefile.am
Log:
Changed test-suite
Modified: squeeze/trunk/tests/zip/Makefile.am
===================================================================
--- squeeze/trunk/tests/zip/Makefile.am 2007-02-19 03:36:33 UTC (rev 24994)
+++ squeeze/trunk/tests/zip/Makefile.am 2007-02-19 10:21:18 UTC (rev 24995)
@@ -8,38 +8,37 @@
$(top_builddir)/libsqueeze/libsqueeze-1.la
TESTS = \
- test-zip-add \
- test-zip-extract \
- test-zip-remove \
- test-zip-refresh
+ test-zip-add.pl \
+ test-zip-extract.pl \
+ test-zip-remove.pl \
+ test-zip-refresh.pl
-check_PROGRAMS = \
- test-zip-add \
- test-zip-extract \
- test-zip-remove \
- test-zip-refresh
+check_PROGRAMS = \
+ test-add \
+ test-extract \
+ test-remove \
+ test-refresh
-test_zip_add_SOURCES = \
- test-zip-add.c
+test_add_SOURCES = \
+ test-add.c
-test_zip_add_DEPENDENCIES = \
+test_add_DEPENDENCIES = \
$(top_builddir)/libsqueeze/libsqueeze-1.la
-test_zip_extract_SOURCES = \
- test-zip-extract.c
+test_extract_SOURCES = \
+ test-extract.c
-test_zip_extract_DEPENDENCIES = \
+test_extract_DEPENDENCIES = \
$(top_builddir)/libsqueeze/libsqueeze-1.la
-test_zip_remove_SOURCES = \
- test-zip-remove.c
+test_remove_SOURCES = \
+ test-remove.c
-test_zip_remove_DEPENDENCIES = \
+test_remove_DEPENDENCIES = \
$(top_builddir)/libsqueeze/libsqueeze-1.la
+test_refresh_SOURCES = \
+ test-refresh.c
-test_zip_refresh_SOURCES = \
- test-zip-refresh.c
-
-test_zip_refresh_DEPENDENCIES = \
+test_refresh_DEPENDENCIES = \
$(top_builddir)/libsqueeze/libsqueeze-1.la
Copied: squeeze/trunk/tests/zip/test-add.c (from rev 24994,
squeeze/trunk/tests/zip/test-zip-add.c)
===================================================================
--- squeeze/trunk/tests/zip/test-add.c (rev 0)
+++ squeeze/trunk/tests/zip/test-add.c 2007-02-19 10:21:18 UTC (rev 24995)
@@ -0,0 +1,91 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <thunar-vfs/thunar-vfs.h>
+#include <libsqueeze/libsqueeze.h>
+
+GMainLoop *loop = NULL;
+gint ret_val = 0;
+gchar *mime_type = NULL;
+
+static GOptionEntry entries[] =
+{
+ { "mime", 'm', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,
&mime_type,
+ NULL,
+ NULL
+ },
+ { NULL }
+};
+
+void
+cb_command_terminated(LSQArchive *archive)
+{
+ if(loop)
+ g_main_loop_quit(loop);
+ else
+ ret_val = 1;
+}
+
+int main(int argc, char **argv)
+{
+ g_type_init();
+ thunar_vfs_init();
+ lsq_init();
+
+ //LSQArchive *archive = NULL;
+ //LSQArchiveSupport *archive_support = NULL;
+
+ GOptionContext *opt_context = g_option_context_new("test-add -m
<mime-type> [OPTION...]");
+ g_option_context_add_main_entries(opt_context, entries, NULL);
+ g_option_context_parse (opt_context, &argc, &argv, NULL);
+
+ if(mime_type == NULL)
+ {
+ //g_error("OOPS");
+ g_print("OOPS");
+ return 1;
+ }
+ else
+ {
+ g_print("MIME_TYPE: %s\n", mime_type);
+ }
+/*
+ lsq_new_archive(path, TRUE, "application/zip", &archive);
+ archive_support =
lsq_get_support_for_mimetype(lsq_archive_get_mimetype(archive));
+
+ g_signal_connect(G_OBJECT(archive), "command-terminated",
G_CALLBACK(cb_command_terminated), NULL);
+
+
+ if(lsq_archive_support_add(archive_support, archive, files))
+ ret_val = 1;
+
+ if(ret_val == 0)
+ {
+ loop = g_main_loop_new(NULL, FALSE);
+ g_main_loop_run(loop);
+ }
+
+ lsq_close_archive(archive);
+*/
+
+ lsq_shutdown();
+ thunar_vfs_shutdown();
+
+ return ret_val;
+}
Copied: squeeze/trunk/tests/zip/test-extract.c (from rev 24994,
squeeze/trunk/tests/zip/test-zip-extract.c)
===================================================================
--- squeeze/trunk/tests/zip/test-extract.c (rev 0)
+++ squeeze/trunk/tests/zip/test-extract.c 2007-02-19 10:21:18 UTC (rev
24995)
@@ -0,0 +1,45 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <thunar-vfs/thunar-vfs.h>
+#include <libsqueeze/libsqueeze.h>
+
+int main()
+{
+ g_type_init();
+
+ LSQArchive *archive = NULL;
+ gchar *current_dir = g_get_current_dir();
+ gchar *path = g_strconcat(current_dir, "/data/test.zip", NULL);
+
+ thunar_vfs_init();
+ lsq_init();
+
+ lsq_new_archive(path, TRUE, "application/zip", &archive);
+
+
+ lsq_close_archive(archive);
+
+ lsq_shutdown();
+ thunar_vfs_shutdown();
+
+ g_free(path);
+ g_free(current_dir);
+ return 0;
+}
Copied: squeeze/trunk/tests/zip/test-refresh.c (from rev 24994,
squeeze/trunk/tests/zip/test-zip-refresh.c)
===================================================================
--- squeeze/trunk/tests/zip/test-refresh.c (rev 0)
+++ squeeze/trunk/tests/zip/test-refresh.c 2007-02-19 10:21:18 UTC (rev
24995)
@@ -0,0 +1,45 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <thunar-vfs/thunar-vfs.h>
+#include <libsqueeze/libsqueeze.h>
+
+int main()
+{
+ g_type_init();
+
+ LSQArchive *archive = NULL;
+ gchar *current_dir = g_get_current_dir();
+ gchar *path = g_strconcat(current_dir, "/data/test.zip", NULL);
+
+ thunar_vfs_init();
+ lsq_init();
+
+ lsq_new_archive(path, TRUE, "application/zip", &archive);
+
+
+ lsq_close_archive(archive);
+
+ lsq_shutdown();
+ thunar_vfs_shutdown();
+
+ g_free(path);
+ g_free(current_dir);
+ return 0;
+}
Copied: squeeze/trunk/tests/zip/test-remove.c (from rev 24994,
squeeze/trunk/tests/zip/test-zip-remove.c)
===================================================================
--- squeeze/trunk/tests/zip/test-remove.c (rev 0)
+++ squeeze/trunk/tests/zip/test-remove.c 2007-02-19 10:21:18 UTC (rev
24995)
@@ -0,0 +1,45 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <thunar-vfs/thunar-vfs.h>
+#include <libsqueeze/libsqueeze.h>
+
+int main()
+{
+ g_type_init();
+
+ LSQArchive *archive = NULL;
+ gchar *current_dir = g_get_current_dir();
+ gchar *path = g_strconcat(current_dir, "/data/test.zip", NULL);
+
+ thunar_vfs_init();
+ lsq_init();
+
+ lsq_new_archive(path, TRUE, "application/zip", &archive);
+
+
+ lsq_close_archive(archive);
+
+ lsq_shutdown();
+ thunar_vfs_shutdown();
+
+ g_free(path);
+ g_free(current_dir);
+ return 0;
+}
Deleted: squeeze/trunk/tests/zip/test-zip-add.c
Added: squeeze/trunk/tests/zip/test-zip-add.pl
===================================================================
--- squeeze/trunk/tests/zip/test-zip-add.pl (rev 0)
+++ squeeze/trunk/tests/zip/test-zip-add.pl 2007-02-19 10:21:18 UTC (rev
24995)
@@ -0,0 +1,10 @@
+#!/usr/bin/env perl
+my $mime_type = "application/x-zip";
+open(ZIP, "./test-add -m $mime_type |");
+
+$aaa = <ZIP>;
+while($aaa)
+{
+ print $aaa;
+ $aaa = <ZIP>;
+}
Property changes on: squeeze/trunk/tests/zip/test-zip-add.pl
___________________________________________________________________
Name: svn:executable
+ *
Deleted: squeeze/trunk/tests/zip/test-zip-extract.c
Added: squeeze/trunk/tests/zip/test-zip-extract.pl
===================================================================
--- squeeze/trunk/tests/zip/test-zip-extract.pl (rev 0)
+++ squeeze/trunk/tests/zip/test-zip-extract.pl 2007-02-19 10:21:18 UTC (rev
24995)
@@ -0,0 +1 @@
+#!/usr/bin/env perl
Property changes on: squeeze/trunk/tests/zip/test-zip-extract.pl
___________________________________________________________________
Name: svn:executable
+ *
Deleted: squeeze/trunk/tests/zip/test-zip-refresh.c
Added: squeeze/trunk/tests/zip/test-zip-refresh.pl
===================================================================
--- squeeze/trunk/tests/zip/test-zip-refresh.pl (rev 0)
+++ squeeze/trunk/tests/zip/test-zip-refresh.pl 2007-02-19 10:21:18 UTC (rev
24995)
@@ -0,0 +1 @@
+#!/usr/bin/env perl
Property changes on: squeeze/trunk/tests/zip/test-zip-refresh.pl
___________________________________________________________________
Name: svn:executable
+ *
Deleted: squeeze/trunk/tests/zip/test-zip-remove.c
Added: squeeze/trunk/tests/zip/test-zip-remove.pl
===================================================================
--- squeeze/trunk/tests/zip/test-zip-remove.pl (rev 0)
+++ squeeze/trunk/tests/zip/test-zip-remove.pl 2007-02-19 10:21:18 UTC (rev
24995)
@@ -0,0 +1 @@
+#!/usr/bin/env perl
Property changes on: squeeze/trunk/tests/zip/test-zip-remove.pl
___________________________________________________________________
Name: svn:executable
+ *
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits