[Pkg-octave-commit] [octave-cgi] 02/05: Imported Upstream version 0.1.2
Rafael Laboissière
rlaboiss-guest at moszumanska.debian.org
Fri Sep 16 16:17:47 UTC 2016
This is an automated email from the git hooks/post-receive script.
rlaboiss-guest pushed a commit to branch master
in repository octave-cgi.
commit 805b880bdc25f4853fc971a3adf4fd08641ef905
Author: Rafael Laboissiere <rafael at debian.org>
Date: Fri Sep 16 12:42:58 2016 -0300
Imported Upstream version 0.1.2
---
DESCRIPTION | 6 +++---
NEWS | 5 +++++
doc/test_cgi.sh | 17 ++++++++++++++++-
doc/test_cgi_upload.m | 4 ++++
doc/test_cgi_upload.sh | 5 +++++
5 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 5617e2c..88dffe5 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,10 +1,10 @@
Name: cgi
-Version: 0.1.1
-Date: 2015-06-22
+Version: 0.1.2
+Date: 2016-09-07
Author: Alexander Barth <barth.alexander at gmail.com>
Maintainer: Alexander Barth <barth.alexander at gmail.com>
Title: cgi
-Description: Common Gatway Interface for Octave
+Description: Common Gateway Interface for Octave
Categories: Web development
Depends: octave (>= 3.8.0)
License: GPLv2+
diff --git a/NEWS b/NEWS
index e4898c6..6d91bf4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Summary of changes for cgi 0.1.2:
+-------------------------------------------------------------------
+
+ ** Allow running the test code from any directory
+
Summary of important user-visible changes for cgi 0.1.1:
-------------------------------------------------------------------
diff --git a/doc/test_cgi.sh b/doc/test_cgi.sh
old mode 100644
new mode 100755
index 4e12f97..0210925
--- a/doc/test_cgi.sh
+++ b/doc/test_cgi.sh
@@ -1,3 +1,4 @@
+# This test script is to be run in the inst directory or after the cgi package is installed.
export DOCUMENT_ROOT=/var/www
export REQUEST_METHOD=GET
@@ -5,6 +6,10 @@ export QUERY_STRING="x=50%2C1,2&y=1,2,3&len=10&name=test&field=random_field"
echo "Test GET request"
octave -q <<EOF
+if isempty(which('cgi'))
+ pkg load cgi
+end
+
CGI = cgi();
disp(CGI.form.y)
assert(strcmp(CGI.form.y,'1,2,3'))
@@ -17,6 +22,10 @@ echo "Test GET request (with semicolon)"
export QUERY_STRING="x=50%2C1,2;y=1,2,3;len=10;name=test;field=random_field"
octave -q <<EOF
+if isempty(which('cgi'))
+ pkg load cgi
+end
+
CGI = cgi();
assert(strcmp(CGI.form.y,'1,2,3'))
assert(strcmp(CGI.form.field,'random_field'))
@@ -31,5 +40,11 @@ export CONTENT_TYPE=application/x-www-form-urlencoded
export CONTENT_LENGTH=54
echo "x=50%2C1,2&y=1,2,3&len=10&name=test&field=random_field" | \
- octave -qH --eval "CGI = cgi(); assert(strcmp(CGI.form.y,'1,2,3')); disp('All tests passed');";
+ octave -qH --eval " \
+if isempty(which('cgi')); \
+ pkg load cgi; \
+end; \
+CGI = cgi(); \
+assert(strcmp(CGI.form.y,'1,2,3')); \
+disp('All tests passed');";
diff --git a/doc/test_cgi_upload.m b/doc/test_cgi_upload.m
index 9a9a943..49a1f85 100644
--- a/doc/test_cgi_upload.m
+++ b/doc/test_cgi_upload.m
@@ -1,3 +1,7 @@
+if isempty(which('cgi'))
+ pkg load cgi
+end
+
CGI = cgi();
assert(strcmp(getfirst(CGI,'submit-name'),'Larry'));
disp('All tests passed');
\ No newline at end of file
diff --git a/doc/test_cgi_upload.sh b/doc/test_cgi_upload.sh
old mode 100644
new mode 100755
index abbe6b6..46caa55
--- a/doc/test_cgi_upload.sh
+++ b/doc/test_cgi_upload.sh
@@ -1,3 +1,8 @@
+# This test script is expected to fail because file upload is not implemented.
+# This script is to be run in the inst directory or after the cgi package is installed.
+
+
+
export DOCUMENT_ROOT=/var/www
export REQUEST_METHOD=POST
export CONTENT_TYPE=multipart/form-data
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-cgi.git
More information about the Pkg-octave-commit
mailing list