File: ExpPath.fth

package info (click to toggle)
fcode-utils 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,768 kB
  • sloc: ansic: 9,717; csh: 241; makefile: 129; sh: 17
file content (63 lines) | stat: -rw-r--r-- 2,014 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
\  Test FLOADing and ENCODing-a-File with embedded Env't V'bles in pathnames
\  Let's not add any requirements on the environment.  We'll expect the
\      existence of a sibling-directory called  TokeCommon
\      and the non-existence of anything with "NonExist" in its name.


fcode-version2
hex
headers

\  Constructs like :h don't work because the path-string
\      gets interpreted by Bourne Shell syntax.
." ${PWD:h}/TokeCommon/OneBeer.fth"
fload ${PWD:h}/TokeCommon/OneBeer.fth

\  This works.
." ${PWD}/../TokeCommon/OneBeer.fth"
fload ${PWD}/../TokeCommon/OneBeer.fth

\  \  Fuggedabout these...
\  ." $PWD:h/TokeCommon/OneBeer.fth"
\  fload $PWD:h/TokeCommon/OneBeer.fth
\  fload $PWD:h/TokeCommon/NonExist.fth
\  ." ../../$PWD:h:t/TokeCommon/BinData.bin"
\  encode-file ../../$PWD:h:t/TokeCommon/BinData.bin
\  ." ../../$PWD:h:t/TokeCommon/ZeroLen.bin"
\  encode-file ../../$PWD:h:t/TokeCommon/ZeroLen.bin

\  Intended not to work
fload $PWD/../NonExist/NonExist.fth
[message] Fload an Unreadable file (No read Permissions)
fload ${PWD}/../TokeCommon/MyBeerAndYouCannotHaveIt.fth
[message] Fload a Zero-Length file (extension doesn't matter...)
fload ${PWD}/../TokeCommon/ZeroLen.bin

[message] FLoad with intentional syntax error
fload ${PWD/../TokeCommon/OneBeer.fth

\  This works.
." $PWD/../TokeCommon/BinData.bin"
encode-file $PWD/../TokeCommon/BinData.bin
" $PWD/../TokeCommon/BinData.bin" property

\  Intended not to work
[message] Encode a NonExistent file
encode-file $PWD/../NonExist/NonExist.bin
[message] Encode an Unreadable file (No read Permissions)
encode-file $PWD/../TokeCommon/NoRead.bin

[message] Encode with intentional syntax error
encode-file ${PWD/../TokeCommon/BinData.bin

[message] Is this a syntax error?  On some O/S'es but not others...
." $PWD}/../TokeCommon/BinData.bin"
encode-file $PWD}/../TokeCommon/BinData.bin

[message] Encode a Zero length data file
." $PWD/../TokeCommon/ZeroLen.bin"
encode-file $PWD/../TokeCommon/ZeroLen.bin

." That is all..."

fcode-end