-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use .tex file attr for BytesIO added to tar.
This must be ensured even when the input filename is, e.g., 'main.fls'. Add test for the case when fls file present in source dir.
- Loading branch information
1 parent
2bc7479
commit 5785f36
Showing
5 changed files
with
130 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# vim:set et sw=4 ts=4: | ||
|
||
""" | ||
Tests for when source dir has .fls file | ||
""" | ||
|
||
import pytest | ||
|
||
from tartex.tartex import TarTeX | ||
|
||
|
||
def test_fls_main_arg(datadir, capsys): | ||
"""User passes a .fls filename as input""" | ||
fls_name = "main.fls" | ||
t = TarTeX( | ||
[str(datadir / fls_name), "-o", str(datadir), "-x", "*.bbl", "-bs"], | ||
) | ||
assert t.tar_file.name == fls_name.replace(".fls", ".tar") | ||
# Note that this will throw because the .bbl file marked as INPUT in | ||
# pre-generated .fls file does not exist in source dir | ||
with pytest.raises(FileNotFoundError) as exc: | ||
t.tar_files() | ||
|
||
assert exc.match("No such file or directory:") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
PWD /home/badshah/Utilities/tartex/tests/test_fls | ||
INPUT /etc/texmf/web2c/texmf.cnf | ||
INPUT /usr/share/texmf/web2c/texmf.cnf | ||
INPUT /var/lib/texmf/web2c/pdftex/pdflatex.fmt | ||
INPUT main.tex | ||
OUTPUT main.log | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/article.cls | ||
INPUT /usr/share/texmf/tex/latex/base/size11.clo | ||
INPUT /usr/share/texmf/tex/latex/base/size11.clo | ||
INPUT /usr/share/texmf/tex/latex/base/size11.clo | ||
INPUT /usr/share/texmf/tex/latex/base/size11.clo | ||
INPUT /usr/share/texmf/fonts/map/fontname/texfonts.map | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmr10.tfm | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT /usr/share/texmf/tex/latex/l3backend/l3backend-pdftex.def | ||
INPUT ./main.aux | ||
INPUT main.aux | ||
INPUT main.aux | ||
OUTPUT main.aux | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmr17.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmr12.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmr8.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmr6.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmmi12.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmmi8.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmmi6.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmsy10.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmsy8.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmsy6.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmr12.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmbx12.tfm | ||
INPUT ./main.toc | ||
INPUT main.toc | ||
INPUT main.toc | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmbx10.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmmi10.tfm | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmsy10.tfm | ||
OUTPUT main.toc | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmbx12.tfm | ||
INPUT ./main.bbl | ||
INPUT main.bbl | ||
INPUT ./main.bbl | ||
INPUT main.bbl | ||
INPUT /usr/share/texmf/fonts/tfm/public/cm/cmti10.tfm | ||
OUTPUT main.pdf | ||
INPUT /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map | ||
INPUT main.aux | ||
INPUT /usr/share/texmf/fonts/type1/public/amsfonts/cm/cmbx10.pfb | ||
INPUT /usr/share/texmf/fonts/type1/public/amsfonts/cm/cmbx12.pfb | ||
INPUT /usr/share/texmf/fonts/type1/public/amsfonts/cm/cmr10.pfb | ||
INPUT /usr/share/texmf/fonts/type1/public/amsfonts/cm/cmr12.pfb | ||
INPUT /usr/share/texmf/fonts/type1/public/amsfonts/cm/cmr17.pfb | ||
INPUT /usr/share/texmf/fonts/type1/public/amsfonts/cm/cmti10.pfb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
\documentclass[11pt,a4paper]{article} | ||
|
||
\author{No Author} | ||
\title{Test bib} | ||
\date{\today} | ||
\begin{document} | ||
\maketitle | ||
\tableofcontents | ||
|
||
\section{Only Section} | ||
|
||
This is a test document with a single citation \cite{testarticle}. | ||
|
||
\subsection{Empty subsection} | ||
|
||
\bibliographystyle{plain} | ||
\bibliography{refs} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@ARTICLE{testarticle, | ||
author = {No Name}, | ||
title = {No Title}, | ||
journal = {No Journal}, | ||
year = {2024}, | ||
otherinfo = {Purely for testing} | ||
} | ||
|