mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-06 22:03:14 +02:00
feat: merge laptop and pc changes
This commit is contained in:
parent
cc8d1e9828
commit
443cc3b0fe
BIN
examples/complicated/table1.pdf
Normal file
BIN
examples/complicated/table1.pdf
Normal file
Binary file not shown.
14
examples/complicated/table1.tex
Normal file
14
examples/complicated/table1.tex
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
\documentclass{article}
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
Here is a table:
|
||||||
|
|
||||||
|
\begin{tabular}{|l|c|r|}
|
||||||
|
\hline
|
||||||
|
left & center & right \\
|
||||||
|
\cline{2-3}
|
||||||
|
paragraph with top alignment & \multicolumn{2}{|c|}{two columns} \\
|
||||||
|
\hline
|
||||||
|
\end{tabular}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
BIN
examples/justLines/table.pdf
Normal file
BIN
examples/justLines/table.pdf
Normal file
Binary file not shown.
8
examples/justLines/table.tex
Normal file
8
examples/justLines/table.tex
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
\documentclass{article}
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\begin{tabular}{|p{20cm}}
|
||||||
|
test \\
|
||||||
|
test
|
||||||
|
\end{tabular}
|
||||||
|
\end{document}
|
||||||
BIN
examples/minimalWorking/table.pdf
Normal file
BIN
examples/minimalWorking/table.pdf
Normal file
Binary file not shown.
7
examples/minimalWorking/table.tex
Normal file
7
examples/minimalWorking/table.tex
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
\documentclass{article}
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\begin{tabular}{c}
|
||||||
|
\end{tabular}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
127
program/tests/test_code/test_tabular_required_parameters.py
Normal file
127
program/tests/test_code/test_tabular_required_parameters.py
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
"""
|
||||||
|
Tests tabular_parameters function
|
||||||
|
"""
|
||||||
|
|
||||||
|
from code.main import tabular_required_parameters
|
||||||
|
|
||||||
|
def given_empty_then_error():
|
||||||
|
"""
|
||||||
|
Given:
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("") == "Error!"
|
||||||
|
|
||||||
|
def given_empty_brackets_then_error():
|
||||||
|
"""
|
||||||
|
Given: {}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{}") == "Error!"
|
||||||
|
|
||||||
|
def given_just_line_then_error():
|
||||||
|
"""
|
||||||
|
Given: {}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{|}") == "Error!"
|
||||||
|
|
||||||
|
|
||||||
|
def given_just_lines_then_error():
|
||||||
|
"""
|
||||||
|
Given: {}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{|||||||}") == "Error!"
|
||||||
|
|
||||||
|
def given_single_left_then_correct():
|
||||||
|
"""
|
||||||
|
Given: {l}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{l}") == ['l']
|
||||||
|
|
||||||
|
def given_single_center_then_correct():
|
||||||
|
"""
|
||||||
|
Given: {c}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{c}") == ['c']
|
||||||
|
|
||||||
|
def given_single_right_then_correct():
|
||||||
|
"""
|
||||||
|
Given: {r}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{r}") == ['r']
|
||||||
|
|
||||||
|
def given_empty_wrap_p_then_error():
|
||||||
|
"""
|
||||||
|
Given: {r}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{p}") == "Error!"
|
||||||
|
|
||||||
|
def given_empty_wrap_m_then_error():
|
||||||
|
"""
|
||||||
|
Given: {r}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{m}") == "Error!"
|
||||||
|
|
||||||
|
def given_empty_wrap_b_then_error():
|
||||||
|
"""
|
||||||
|
Given: {r}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{b}") == "Error!"
|
||||||
|
|
||||||
|
def given_empty_wrap_p_brackets_then_error():
|
||||||
|
"""
|
||||||
|
Given: {r}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{p{}}") == "Error!"
|
||||||
|
|
||||||
|
def given_empty_wrap_m_brackets_then_error():
|
||||||
|
"""
|
||||||
|
Given: {r}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{m{}}") == "Error!"
|
||||||
|
|
||||||
|
def given_empty_wrap_b_brackets_then_error():
|
||||||
|
"""
|
||||||
|
Given: {r}
|
||||||
|
When: N/A
|
||||||
|
Then: <!DOCTYPE html><html>
|
||||||
|
"""
|
||||||
|
assert tabular_required_parameters("{b{}}") == "Error!"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def test_tabular_required_parameters():
|
||||||
|
given_empty_then_error()
|
||||||
|
given_empty_brackets_then_error()
|
||||||
|
given_just_line_then_error()
|
||||||
|
given_just_lines_then_error()
|
||||||
|
given_single_left_then_correct()
|
||||||
|
given_single_center_then_correct()
|
||||||
|
given_single_right_then_correct()
|
||||||
|
given_empty_wrap_p_then_error()
|
||||||
|
given_empty_wrap_m_then_error()
|
||||||
|
given_empty_wrap_b_then_error()
|
||||||
|
given_empty_wrap_p_brackets_then_error()
|
||||||
|
given_empty_wrap_m_brackets_then_error()
|
||||||
|
given_empty_wrap_b_brackets_then_error()
|
||||||
Loading…
Reference in New Issue
Block a user