[Pkg-owncloud-commits] [owncloud-client] 259/498: Unit test for the long filename conversion on win32

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 2f0a404116f1cba05e2be04c0b9c992c534048e7
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Fri Jun 19 12:59:56 2015 +0200

    Unit test for the long filename conversion on win32
---
 csync/tests/encoding_tests/check_encoding.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/csync/tests/encoding_tests/check_encoding.c b/csync/tests/encoding_tests/check_encoding.c
index b571981..403aa22 100644
--- a/csync/tests/encoding_tests/check_encoding.c
+++ b/csync/tests/encoding_tests/check_encoding.c
@@ -18,13 +18,14 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include "torture.h"
-
+#include <stdio.h>
 #include "c_string.h"
 
 #ifdef _WIN32
 #include <string.h>
 #endif
 
+
 static void setup(void **state)
 {
     int rc = 0;
@@ -142,13 +143,27 @@ static void check_to_multibyte(void **state)
     c_free_locale_string(mb_null);
 }
 
+static void check_long_win_path(void **state)
+{
+    const char *path = "C://DATA/FILES/MUSIC/MY_MUSIC.mp3";
+    const char *new = makeLongWinPath(path);
+
+    assert_string_equal(new, "\\\\?\\C:\\\\DATA\\FILES\\MUSIC\\MY_MUSIC.mp3");
+    printf( "XXXXXXXXXXXX %s\n", new);
+    assert_int_equal( strlen(new), 37);
+
+}
+
 int torture_run_tests(void)
 {
     const UnitTest tests[] = {
+        unit_test_setup_teardown(check_long_win_path,                    setup, teardown),
+
         unit_test_setup_teardown(check_to_multibyte,                    setup, teardown),
         unit_test_setup_teardown(check_iconv_ascii,                     setup, teardown),
         unit_test_setup_teardown(check_iconv_to_native_normalization,   setup, teardown),
         unit_test_setup_teardown(check_iconv_from_native_normalization, setup, teardown),
+
     };
 
     return run_tests(tests);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list