Skip to content

Commit a820e2e

Browse files
committed
Document package test procedure and dependencies.
1 parent 6bdb6aa commit a820e2e

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ makedocs(
1010
"types.md",
1111
"read.md",
1212
"write.md",
13+
"tests.md",
1314
"Index" => "theindex.md"
1415
]
1516
)

docs/src/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Pages = [
2828
"types.md",
2929
"read.md",
3030
"write.md",
31+
"tests.md",
3132
"theindex.md"
3233
]
3334
```

docs/src/tests.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Package Tests
2+
3+
This package can be tested in the usual Julia way:
4+
```julia
5+
Pkg.test("FortranFiles")
6+
```
7+
However, in order to test whether files written by a Fortran program
8+
are properly read, this first needs to generate some Fortran output.
9+
Therefore the following external dependencies are required to run the
10+
tests:
11+
* gfortran (a reasonably recent version, which understands the `-std=f2008` flag)
12+
* GNU make
13+
* Perl
14+
15+
The tests perform the following steps:
16+
1. Create the Fortran source code, and compile it.
17+
1. Create the Julia source code for reading the Fortran data,
18+
and for writing it out again.
19+
1. Run the Fortran program. This produces the input test data.
20+
1. Use the Julia code to read in the test data. Datatype and storage
21+
size of the read items are checked against their expected values.
22+
1. Use the Julia code to read parts of the test data, i.e. records are
23+
skipped or read incompletely.
24+
1. Use the Julia code to write the data to an output file.
25+
1. Check that the input and output file are identical.
26+
This sequence of steps is performed for each of the tested record marker types,
27+
using the appropriate gfortran compiler options to adjust the Fortran output.
28+

docs/src/theindex.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Pages = [
99
"files.md",
1010
"types.md",
1111
"read.md",
12-
"write.md"
12+
"write.md",
13+
"tests.md"
1314
]
1415
```

0 commit comments

Comments
 (0)