From 46e04e857c4d0541b71231a3d33bdc0fcfc2f807 Mon Sep 17 00:00:00 2001
From: Sergey Lyubka <valenok@gmail.com>
Date: Tue, 24 Sep 2013 10:08:39 +0100
Subject: [PATCH] Added test for dir with non-ascii char

---
 .../\346\241\214\351\235\242/index.html"           |  1 +
 test/test.pl                                       | 14 ++------------
 2 files changed, 3 insertions(+), 12 deletions(-)
 create mode 100644 "test/dir with spaces/\346\241\214\351\235\242/index.html"

diff --git "a/test/dir with spaces/\346\241\214\351\235\242/index.html" "b/test/dir with spaces/\346\241\214\351\235\242/index.html"
new file mode 100644
index 000000000..fcb024ea9
--- /dev/null
+++ "b/test/dir with spaces/\346\241\214\351\235\242/index.html"	
@@ -0,0 +1 @@
+куку!
diff --git a/test/test.pl b/test/test.pl
index 32406fb88..cdc8bd86c 100644
--- a/test/test.pl
+++ b/test/test.pl
@@ -150,11 +150,6 @@ if ($^O =~ /darwin|bsd|linux/) {
   }
 }
 
-if (scalar(@ARGV) > 0 and $ARGV[0] eq 'unit') {
-  do_unit_test();
-  exit 0;
-}
-
 # Make sure we load config file if no options are given.
 # Command line options override config files settings
 write_file($config, "access_log_file access.log\n" .
@@ -181,9 +176,10 @@ my $cmd = "$mongoose_exe ".
 $cmd .= ' -cgi_interpreter perl' if on_windows();
 spawn($cmd);
 
+o("GET /dir%20with%20spaces/桌面/ HTTP/1.0\r\n\r\n", 'куку!',
+  'Non-ascii chars in path');
 o("GET /hello.txt HTTP/1.1\nConnection: close\nRange: bytes=3-50\r\n\r\n",
   'Content-Length: 15\s', 'Range past the file end');
-
 o("GET /hello.txt HTTP/1.1\n\n   GET /hello.txt HTTP/1.0\n\n",
   'HTTP/1.1 200.+keep-alive.+HTTP/1.1 200.+close',
   'Request pipelining', 2);
@@ -430,7 +426,6 @@ unless (scalar(@ARGV) > 0 and $ARGV[0] eq "basic_tests") {
 
   do_PUT_test();
   kill_spawned_child();
-  do_unit_test();
 }
 
 sub do_PUT_test {
@@ -459,9 +454,4 @@ sub do_PUT_test {
     "HTTP/1.1 100 Continue.+HTTP/1.1 200", 'PUT 100-Continue');
 }
 
-sub do_unit_test {
-  my $target = on_windows() ? 'wi' : 'un';
-  system("make $target") == 0 or fail("Unit test failed!");
-}
-
 print "SUCCESS! All tests passed.\n";
-- 
GitLab