Go to the previous, next section.
@everyfooting Author: henry // Texinfo: ensley @| @| 3 December 1994
for (i=0; i<array_length; i++)
printf(" site_list[i]");
Before doing this, the designer of the site-list must know how many anonymous ftp sites he/she has put in so that when he/she is doing the C routine to print the site list, he/she will know whether it is correct or not.
a.cs.uiuc.edu 128.174.252.1 ab20.larc.nasa.gov 128.155.23.64 ads.com 128.229.30.16 albanycs.albany.edu 128.204.1.4 ames.arc.nasa.gov 128.102.18.3
We can divide it into three steps to test the site-builder module: 1. At the email interface, you get "addnewsite cs.orst.edu 128.193.32.1". Now what you need to do is to ftp to that site to see whether it's a valid ftp site or not. The details on how to ftp to a site is discussed in the user manual and the implementation manual. When connecting to the site, check if it's compartible to our archie search system using "ls -lR" command. In this case, everything is fine. You then add the "cs.orst.edu 128.193.32.1" to the appropriate position (alphabetical order) on the list. Now use the routine which I discussed at the beginning of this article to print out the site list, it will look like this:
a.cs.uiuc.edu 128.174.252.1 ab20.larc.nasa.gov 128.155.23.64 ads.com 128.229.30.16 albanycs.albany.edu 128.204.1.4 ames.arc.nasa.gov 128.102.18.3 cs.orst.edu 128.193.32.1Now try to create a whatever anonymous ftp site which actually does not exist, something like this : "whatever.funny.try.edu 123.456.789.0" Use command "addnewsite whatever.funny.try.edu 123.456.789.0". Then you can use the routine to print out the list again, it will still look this:
a.cs.uiuc.edu 128.174.252.1 ab20.larc.nasa.gov 128.155.23.64 ads.com 128.229.30.16 albanycs.albany.edu 128.204.1.4 ames.arc.nasa.gov 128.102.18.3 cs.orst.edu 128.193.32.1and give you an error message "the ftp site does not exist". 2.Delete. At the email message, you get "delete a.cs.uiuc.edu 128.174.252.1". Then the system will automatically go to the site list to check if the site is there. If it is there, it will then prompt you "Are you sure?" After answering "Y (or yes)", it will then go ahead to delete the the site from the list. Now use the routine to print the site list, you will see:
ab20.larc.nasa.gov 128.155.23.64 ads.com 128.229.30.16 albanycs.albany.edu 128.204.1.4 ames.arc.nasa.gov 128.102.18.3 cs.orst.edu 128.193.32.1The "a.cs.uiuc.edu 128.174.252.1" is gone! Now let's try to delete a site which is not on the site list. Use the command "delete csus.edu 130.86.90.1". Use the routine to print the list, you'll see:
ab20.larc.nasa.gov 128.155.23.64 ads.com 128.229.30.16 albanycs.albany.edu 128.204.1.4 ames.arc.nasa.gov 128.102.18.3 cs.orst.edu 128.193.32.1That the same list, nothing was changed! And you will get an error message as "Sorry, the site you've given is not on the list". 3. Not commands. When you get an email message which is not a a command, the site-list-builder will do nothing. The site list remains the same. For example, you get an email message like"please ignore this message, this is just a try". The module can not find the command (which are "addnew" and "delete"), so it will do nothing. Use the routine to print out the site list:
ab20.larc.nasa.gov 128.155.23.64 ads.com 128.229.30.16 albanycs.albany.edu 128.204.1.4 ames.arc.nasa.gov 128.102.18.3 cs.orst.edu 128.193.32.1Same thing!!
That's basically my test plan for both the site-list and the site-list-builder. The readers will find it easy to understand and test. It actually is very easy to test. What you need to do is to try the three steps which I listed above to see if everything is ok. If everything turns out to be fine, then my module for this project is fine. If things don't work out, then I need to go back to see where something is wrong. This test plan is feasible, and is easy to implement and test. The result is obvious, too.
Go to the previous, next section.