#!/bin/ch 
/* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
#include <wcgi.h>

int main() {
  class CResponse Response;
  class CRequest Request;
  class CServer Server;
  chchar *path_virtual, *path_physical;

  Response.begin();
  Response.title(L"The Result of Test of Server.mapPath");
  printf("<H1> The Result of Test of Server.mapPath</H1><p>\n ");

  path_virtual = Request.getForm(L"mapPath");
  path_physical = Server.mapPath(path_virtual);
  if (path_virtual != NULL) {
    printf("the path of \"");
    fputws(path_virtual, stdout);
    printf("\" is mapped to \"");
    fputws(path_physical ? path_physical : L"(null)", stdout);
    printf("\" \n <p>\n");
  }
  else
    printf("Please input a valid virtual path to map<p>\n");

  Response.end();
}