XNSFilingTestImpl.mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Bill Jackson (bj), May 25, 1990 8:37 pm PDT
DIRECTORY
Commander USING [CommandProc, Register],
FilingAttributesP10V5 USING [InterpretedAttributeType],
FilingP10V5 USING [ScopeSequence],
FilingP10V5Aux USING [ExposeScopeSequence],
IO,
PFS,
PFSNames,
Rope USING [ROPE],
XNSFilingNames USING [ParseName],
XNSFilingAttributes USING [BuildScope];
XNSFilingTestImpl:
CEDAR
MONITOR
IMPORTS Commander, FilingP10V5Aux, IO, PFS, XNSFilingNames, XNSFilingAttributes ~ {
OPEN FilingAttributesP10V5;
ROPE: TYPE ~ Rope.ROPE;
TestParseNameCmd: Commander.CommandProc ~ {
out: IO.STREAM ~ cmd.out;
rope: ROPE ~ "BJackson!1/VP from 80MB!1";
parsedName: PFSNames.PATH ~ XNSFilingNames.ParseName[rope];
name: ROPE ~ PFS.RopeFromPath[parsedName];
out.PutF["rope: %g, name: %g\n", IO.rope[rope], IO.rope[name] ];
};
TestScopeCmd: Commander.CommandProc ~ {
out: IO.STREAM ~ cmd.out;
matcher: ROPE ~ "BJackson/bridge.tar.Z!+";
scope: FilingP10V5.ScopeSequence ~ XNSFilingAttributes.BuildScope[$matches, matcher, InterpretedAttributeType.pathname.ORD];
res: ROPE ~ FilingP10V5Aux.ExposeScopeSequence[scope, 1];
out.PutF["%g\n", IO.rope[res] ];
};
Commander.Register["TestScope", TestScopeCmd, "XNSFilingTestImpl operation"];
Commander.Register["TestParseName", TestParseNameCmd, "XNSFilingTestImpl operation"];
}.