Annotation of doc/loncapafiles/math_random_check.piml, revision 1.2

1.1       albertel    1: <!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
                      2: 	"http://lpml.sourceforge.net/DTD/piml.dtd">
1.2     ! raeburn     3: <!-- math_random_check.piml -->
1.1       albertel    4: 
1.2     ! raeburn     5: <!-- $Id: math_random_check.piml,v 1.1 2007/10/22 22:05:41 albertel Exp $ -->
1.1       albertel    6: 
                      7: <!--
                      8: 
                      9: This file is part of the LearningOnline Network with CAPA (LON-CAPA).
                     10: 
                     11: LON-CAPA is free software; you can redistribute it and/or modify
                     12: it under the terms of the GNU General Public License as published by
                     13: the Free Software Foundation; either version 2 of the License, or
                     14: (at your option) any later version.
                     15: 
                     16: LON-CAPA is distributed in the hope that it will be useful,
                     17: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     18: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     19: GNU General Public License for more details.
                     20: 
                     21: You should have received a copy of the GNU General Public License
                     22: along with LON-CAPA; if not, write to the Free Software
                     23: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     24: 
                     25: /home/httpd/html/adm/gpl.txt
                     26: 
                     27: http://www.lon-capa.org/
                     28: 
                     29: -->
                     30: 
                     31: <piml>
                     32: <targetroot>/</targetroot>
                     33: <files>
                     34: <file>
                     35: <target dist="default">/home/httpd/lonUsers</target>
                     36: <perlscript mode="fg">
                     37: 
                     38: use strict;
                     39: use Math::Random;
                     40: 
                     41: my $version = $Math::Random::VERSION;
                     42: 
                     43: my $good = "100755189, 832255242";
                     44: 
                     45: &random_set_seed_from_phrase('testing the phrase seeding');
                     46: my $result = join(', ',&random_get_seed());
                     47: if ($result ne $good) {
                     48:     print &lt;&lt;"END";
                     49: **** ERROR: Math::Random is not working properly.
                     50:         You are using version $version. 
                     51:         It returned $result rather than $good 
                     52: END
                     53: }
                     54: 
                     55: </perlscript>
                     56: </file>
                     57: </files>
                     58: </piml>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>