mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-11-04 06:09:48 +00:00
initial checkin
This commit is contained in:
parent
822244497a
commit
22929ce3a8
59
usr.bin/catrez/tests/dotests
Normal file
59
usr.bin/catrez/tests/dotests
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# Tests for catrez command; invoked by command file "fulltests"
|
||||||
|
# Written by Dave Tribby (August 1997)
|
||||||
|
# $Id: dotests,v 1.1 1997/09/30 05:09:25 gdr Exp $
|
||||||
|
|
||||||
|
# Location of the catrez command to be tested
|
||||||
|
set testcmd="../catrez"
|
||||||
|
|
||||||
|
# Record starting time
|
||||||
|
echo -n "Testing command $testcmd beginning at"
|
||||||
|
date
|
||||||
|
|
||||||
|
# Name of test resource file
|
||||||
|
set testfile="testcr"
|
||||||
|
|
||||||
|
# The following file is the source for testcr.rez:
|
||||||
|
# #include "types.rez"
|
||||||
|
# resource rPString (1,protected)
|
||||||
|
# {"This should be a protected Pascal string"};
|
||||||
|
# resource rPString (2)
|
||||||
|
# {"This is an unprotected Pascal string"};
|
||||||
|
# Create testcr.r with the following:
|
||||||
|
# occ testcr.rez
|
||||||
|
|
||||||
|
echo "Creating copy of $testfile.r with $testcmd"
|
||||||
|
$testcmd -d /tmp/$testfile.r2 $testfile.r
|
||||||
|
echo " Completion status = $status"
|
||||||
|
echo "Creating listings of original and duplicated resources"
|
||||||
|
derez $testfile.r types.rez > /tmp/$testfile.l1
|
||||||
|
derez /tmp/$testfile.r2 types.rez > /tmp/$testfile.l2
|
||||||
|
echo ""
|
||||||
|
echo "Comparing listing of original and duplicate files"
|
||||||
|
cmp /tmp/$testfile.l1 /tmp/$testfile.l2
|
||||||
|
echo " Completion status = $status"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "Getting version information"
|
||||||
|
set cmp="version.out"
|
||||||
|
set dest="/tmp/$cmp"
|
||||||
|
$testcmd > $dest
|
||||||
|
cmp $cmp $dest
|
||||||
|
echo " Completion status = $status"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "***** Error Messages *****"
|
||||||
|
|
||||||
|
set dest="/tmp/err.cond"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Expected errors: illegal option"
|
||||||
|
echo " option requires an argument"
|
||||||
|
echo " No destination filename provided"
|
||||||
|
$testcmd -x -d
|
||||||
|
echo " Error completion status = $status (expected: 1)"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
set src="badname"
|
||||||
|
echo "Expected error opening resource fork of $src"
|
||||||
|
$testcmd -d $dest $src
|
||||||
|
echo " Error completion status = $status (expected: 1)"
|
29
usr.bin/catrez/tests/fulltests
Normal file
29
usr.bin/catrez/tests/fulltests
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# gsh script to run tests and collect results
|
||||||
|
# Written by Dave Tribby * August 1997
|
||||||
|
# $Id: fulltests,v 1.1 1997/09/30 05:09:26 gdr Exp $
|
||||||
|
|
||||||
|
# Name of gsh script containing test cases
|
||||||
|
set command="dotests"
|
||||||
|
# Sometimes the file type is modified by editing; make it executable
|
||||||
|
chtyp -l exec $command
|
||||||
|
|
||||||
|
# Filenames for raw and modified results
|
||||||
|
set raw_file="/tmp/rawlist"
|
||||||
|
set result_file="test.list"
|
||||||
|
|
||||||
|
# Location of tr command that knows how to handle classes
|
||||||
|
set trcmd="/src/gno/usr.bin/tr/tr"
|
||||||
|
|
||||||
|
# --- Begin the tests ---
|
||||||
|
|
||||||
|
echo -n "Executing test script \"$command\" from directory "
|
||||||
|
pwd
|
||||||
|
|
||||||
|
# Create a new gsh invocation and record all I/O
|
||||||
|
echo "$command ; exit" | script $raw_file
|
||||||
|
|
||||||
|
# Cleanup control chars using either of the following...
|
||||||
|
echo "Done with tests. Removing control characters from results file"
|
||||||
|
$trcmd -c -ds '[:print:]\r' '\r' < $raw_file > $result_file
|
||||||
|
|
||||||
|
echo "Tests results have been saved as \"$result_file\""
|
33
usr.bin/catrez/tests/test.list
Normal file
33
usr.bin/catrez/tests/test.list
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Script started on: Sun Sep 28 23:36:45 1997
|
||||||
|
[61] tests=> dotests ; exit
|
||||||
|
Testing command ../catrez beginning at Sun Sep 28 23:36:55 1997
|
||||||
|
Creating copy of testcr.r with ../catrez
|
||||||
|
==> 610 stack bytes used <==
|
||||||
|
Completion status = 0
|
||||||
|
Creating listings of original and duplicated resources
|
||||||
|
--\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\-/| --\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\-/|
|
||||||
|
Comparing listing of original and duplicate files
|
||||||
|
Completion status = 0
|
||||||
|
|
||||||
|
Getting version information
|
||||||
|
==> 833 stack bytes used <==
|
||||||
|
Completion status = 0
|
||||||
|
|
||||||
|
***** Error Messages *****
|
||||||
|
|
||||||
|
Expected errors: illegal option
|
||||||
|
option requires an argument
|
||||||
|
No destination filename provided
|
||||||
|
catrez: illegal option -- x
|
||||||
|
catrez: option requires an argument -- d
|
||||||
|
Error: No destination filename provided
|
||||||
|
Usage:
|
||||||
|
catrez [-va] -d dest_file file1 [file2 ...]
|
||||||
|
==> 706 stack bytes used <==
|
||||||
|
Error completion status = 1 (expected: 1)
|
||||||
|
|
||||||
|
Expected error opening resource fork of badname
|
||||||
|
Error $0046 opening resource fork of badname
|
||||||
|
==> 720 stack bytes used <==
|
||||||
|
Error completion status = 1 (expected: 1)
|
||||||
|
Script done on: Sun Sep 28 23:37:44 1997
|
5
usr.bin/catrez/tests/testcr.rez
Normal file
5
usr.bin/catrez/tests/testcr.rez
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "types.rez"
|
||||||
|
resource rPString (1,protected)
|
||||||
|
{"This should be a protected Pascal string"};
|
||||||
|
resource rPString (2)
|
||||||
|
{"This is an unprotected Pascal string"};
|
4
usr.bin/catrez/tests/version.out
Normal file
4
usr.bin/catrez/tests/version.out
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Usage:
|
||||||
|
catrez [-va] -d dest_file file1 [file2 ...]
|
||||||
|
Copyright 1996-1997 by David M. Tribby
|
||||||
|
Version 1.0.2 (Sep 28 1997)
|
Loading…
Reference in New Issue
Block a user