Skip to content

Commit

Permalink
tests: add some basic tests for \filedump and \filesize
Browse files Browse the repository at this point in the history
  • Loading branch information
pkgw committed Oct 27, 2020
1 parent 3f43d56 commit a0fdaa1
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 8 deletions.
20 changes: 15 additions & 5 deletions tests/tex-outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ fn a4paper() {
.go()
}

#[test]
fn creationdate() {
TestCase::new("creationdate").go()
}

#[test]
fn file_encoding() {
// Need to do this here since we call test_path unusually early.
Expand Down Expand Up @@ -233,6 +228,21 @@ fn otf_basic() {
.go()
}

#[test]
fn prim_creationdate() {
TestCase::new("prim_creationdate").go()
}

#[test]
fn prim_filedump() {
TestCase::new("prim_filedump").go()
}

#[test]
fn prim_filesize() {
TestCase::new("prim_filesize").go()
}

#[test]
fn tex_logo() {
TestCase::new("tex_logo").go()
Expand Down
3 changes: 0 additions & 3 deletions tests/tex-outputs/creationdate.log

This file was deleted.

3 changes: 3 additions & 0 deletions tests/tex-outputs/prim_creationdate.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**
(prim_creationdate.tex [1] )
Output written on prim_creationdate.xdv (1 page, 228 bytes).
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions tests/tex-outputs/prim_filedump.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**
(prim_filedump.tex [1] )
Output written on prim_filedump.xdv (1 page, 212 bytes).
4 changes: 4 additions & 0 deletions tests/tex-outputs/prim_filedump.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
% 0123456789abcdefghijklmnopqrstuvwxyz long first line to avoid caring what EOL is
X\filedump offset 2 length 10 {prim_filedump.tex}%
Y\filedump offset 9999 length 0 {nosuchfile.tex}%
Z\bye
Binary file added tests/tex-outputs/prim_filedump.xdv
Binary file not shown.
3 changes: 3 additions & 0 deletions tests/tex-outputs/prim_filesize.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**
(prim_filesize.tex [1] )
Output written on prim_filesize.xdv (1 page, 212 bytes).
1 change: 1 addition & 0 deletions tests/tex-outputs/prim_filesize.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
X\filesize{nosuchfile}Y\filesize{prim_filesize.tex}Z\bye%no-EOL-newline-to-keep-size-same-on-Windows
Binary file added tests/tex-outputs/prim_filesize.xdv
Binary file not shown.

0 comments on commit a0fdaa1

Please sign in to comment.