gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash testsuite/libnet.all/test_http.cpp ChangeLog


From: Rob Savoye
Subject: [Gnash-commit] gnash testsuite/libnet.all/test_http.cpp ChangeLog
Date: Wed, 02 Apr 2008 02:06:58 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    08/04/02 02:06:58

Modified files:
        testsuite/libnet.all: test_http.cpp 
        .              : ChangeLog 

Log message:
                * testsuite/libnet.all/test_http.cpp: Adjust patterns because 
all
                header fields now have a "\r\n" instead of just a "\n".

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libnet.all/test_http.cpp?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6149&r2=1.6150

Patches:
Index: testsuite/libnet.all/test_http.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libnet.all/test_http.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- testsuite/libnet.all/test_http.cpp  31 Mar 2008 10:51:30 -0000      1.4
+++ testsuite/libnet.all/test_http.cpp  2 Apr 2008 02:06:57 -0000       1.5
@@ -85,7 +85,8 @@
     // Check the Date field
     // The date should look something like this:
     //     Date: Mon, 10 Dec 2007  GMT
-    regcomp (&regex_pat, "Date: [A-Z][a-z]*, [0-9]* [A-Z][a-z]* [0-9]* [0-9:]* 
*GMT$",
+    //     Date: Tue, 1 Apr 2008 19:52:16 GMT\r\n
+    regcomp (&regex_pat, "Date: [A-Z][a-z]*, [0-9]* [A-Z][a-z]* [0-9]* [0-9:]* 
*GMT.*$",
              REG_NOSUB|REG_NEWLINE);
     if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) 
{
         runtest.fail ("HTTP::formatDate()");
@@ -96,10 +97,11 @@
     regfree(&regex_pat);
 
     // Check the Content-Length field
+    // Content-Length: 12345\r\n"
     http.clearHeader();
     http.formatContentLength(12345);
 //    cerr << "FIXME: " << http.getHeader() << endl;
-    regcomp (&regex_pat, "Content-Length: [0-9]*$",
+    regcomp (&regex_pat, "Content-Length: [0-9]*.*$",
              REG_NOSUB|REG_NEWLINE);
     if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) 
{
         runtest.fail ("HTTP::formatContentLength()");
@@ -128,7 +130,7 @@
     http.clearHeader();
     http.formatServer();
 //    cerr << "FIXME: " << http.getHeader() << endl;
-    regcomp (&regex_pat, "Server: Cygnal (GNU/Linux)$",
+    regcomp (&regex_pat, "Server: Cygnal (GNU/Linux).*$",
              REG_NOSUB|REG_NEWLINE);
     if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) 
{
         runtest.fail ("HTTP::formatServer()");
@@ -143,7 +145,7 @@
     data = "localhost:4080";
     http.formatHost(data);
 //    cerr << "FIXME: " << http.getHeader() << endl;
-    regcomp (&regex_pat, "Host: [A-za-z-]*:[0-9]*$",
+    regcomp (&regex_pat, "Host: [A-za-z-]*:[0-9]*.*$",
              REG_NOSUB|REG_NEWLINE);
     if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) 
{
         runtest.fail ("HTTP::formatHost()");
@@ -158,7 +160,7 @@
     data = "en-US,en;q=0.9";
     http.formatLanguage(data);
 //    cerr << "FIXME: " << http.getHeader() << endl;
-    regcomp (&regex_pat, "Accept-Language: en-US,en;q=0.9$",
+    regcomp (&regex_pat, "Accept-Language: en-US,en;q=0.9.*$",
              REG_NOSUB|REG_NEWLINE);
     if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) 
{
         runtest.fail ("HTTP::formatLanguage()");
@@ -267,10 +269,11 @@
     regfree(&regex_pat);
 
     // Check formatHeader()
+    // HTTP/1.1 200 OK\r\nDate: Tue, 1 Apr 2008 19:58:40 GMT\r\nServer: Cygnal 
(GNU/Linux)\r\nLast-Modified: Tue, 1 Apr 2008 19:58:40 GMT\r\nEtag: 
24103b9-1c54-ec8632c0\r\nAccept-Ranges: bytes\r\nContent-Length: 0\r\nKeep
     http.clearHeader();
     http.formatHeader(HTTP::LIFE_IS_GOOD);
 //    cerr << "FIXME: " << http.getHeader() << endl;
-    regcomp (&regex_pat, "HTTP/1.1 200 
OK.*Date:.*Connection:.*-Length.*-Type:.*$",
+    regcomp (&regex_pat, "HTTP/1.1 200 
OK.*Date:.*Server:.*:.*-Length.*-Type:.*$",
              REG_NOSUB);        // note that we do want to look for NL
     if (regexec (&regex_pat, http.getHeader().c_str(), 0, (regmatch_t *)0, 0)) 
{
         runtest.fail ("HTTP::formatHeader(port)");

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6149
retrieving revision 1.6150
diff -u -b -r1.6149 -r1.6150
--- ChangeLog   2 Apr 2008 01:05:01 -0000       1.6149
+++ ChangeLog   2 Apr 2008 02:06:57 -0000       1.6150
@@ -1,3 +1,8 @@
+2008-04-01  Rob Savoye  <address@hidden>
+
+       * testsuite/libnet.all/test_http.cpp: Adjust patterns because all
+       header fields now have a "\r\n" instead of just a "\n".
+       
 2008-04-01 Sandro Santilli <address@hidden>
 
        * server/parser/movie_def_impl.cpp (read_all_swf): on end of stream




reply via email to

[Prev in Thread] Current Thread [Next in Thread]