You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by ro...@apache.org on 2002/04/18 20:16:34 UTC

cvs commit: tcl-websh/src/apachetests hello.test hello.ws3 websh.conf

ronnie      02/04/18 11:16:34

  Modified:    src/apachetests hello.test hello.ws3 websh.conf
  Log:
  - added test for web::config stuff
  
  Revision  Changes    Path
  1.5       +12 -4     tcl-websh/src/apachetests/hello.test
  
  Index: hello.test
  ===================================================================
  RCS file: /home/cvs/tcl-websh/src/apachetests/hello.test,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- hello.test	18 Mar 2002 22:11:28 -0000	1.4
  +++ hello.test	18 Apr 2002 18:16:34 -0000	1.5
  @@ -1,13 +1,21 @@
  -# $Id: hello.test,v 1.4 2002/03/18 22:11:28 davidw Exp $
  +# $Id: hello.test,v 1.5 2002/04/18 18:16:34 ronnie Exp $
   
   # hello world test
   
  -set testfilename1 "hello.ws3"
  +set testfilename    "my_script_hello.ws3"
  +set testinterpclass "hello.ws3"
  +
  +set CWD [pwd]
  +set response "Hello, World\n"
  +append response "script: $CWD/$testfilename\n"
  +append response "server_root: $CWD\n"
  +append response "document_root: $CWD\n"
  +append response "interpclass: $CWD/$testinterpclass\n"
   
   ::tcltest::test hello-1.1 {hello world test} {
       apachetest::start {} {
  -	set page [ ::http::geturl "${urlbase}$testfilename1" ]
  +	set page [::http::geturl "${urlbase}$testfilename/path_info_dummy" ]
   	set match [::http::data $page]
       }
       set match
  -} {Hello, World}
  +} $response
  
  
  
  1.2       +6 -2      tcl-websh/src/apachetests/hello.ws3
  
  Index: hello.ws3
  ===================================================================
  RCS file: /home/cvs/tcl-websh/src/apachetests/hello.ws3,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hello.ws3	3 Dec 2001 15:37:39 -0000	1.1
  +++ hello.ws3	18 Apr 2002 18:16:34 -0000	1.2
  @@ -1,8 +1,12 @@
  -# $Id: hello.ws3,v 1.1 2001/12/03 15:37:39 davidw Exp $
  +# $Id: hello.ws3,v 1.2 2002/04/18 18:16:34 ronnie Exp $
   # hello world websh code.
   
   web::command default {
  -    web::put "Hello, World"
  +    web::put "Hello, World\n"
  +    web::put "script: [web::config script]\n"
  +    web::put "server_root: [web::config server_root]\n"
  +    web::put "document_root: [web::config document_root]\n"
  +    web::put "interpclass: [web::config interpclass]\n"
   }
   
   web::dispatch
  
  
  
  1.2       +10 -0     tcl-websh/src/apachetests/websh.conf
  
  Index: websh.conf
  ===================================================================
  RCS file: /home/cvs/tcl-websh/src/apachetests/websh.conf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- websh.conf	17 Apr 2002 16:30:26 -0000	1.1
  +++ websh.conf	18 Apr 2002 18:16:34 -0000	1.2
  @@ -1,4 +1,14 @@
  +# WebshConfig file
  +
  +# $Id: websh.conf,v 1.2 2002/04/18 18:16:34 ronnie Exp $
  +
   proc web::interpmap {file} {
  +
  +    # hello test
  +    if {[string match "*/my_script_hello.ws3" $file]} {
  +	return [file join [file dirname $file] hello.ws3]
  +    }
  +
       # standard tests
       return $file
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org