aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-03-01 14:49:41 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-03-01 14:49:41 +0100
commite57cde648e801c949ea342ca4ff372fa9d2ad25c (patch)
treed33989dc187283ea83a2e3e85473744f953105c6
parenta0f278b13a1347663fd9626322b30e7b87615a0d (diff)
downloadminishell_test-e57cde648e801c949ea342ca4ff372fa9d2ad25c.tar.gz
minishell_test-e57cde648e801c949ea342ca4ff372fa9d2ad25c.tar.bz2
minishell_test-e57cde648e801c949ea342ca4ff372fa9d2ad25c.zip
Added linux documentation
-rw-r--r--.travis.yml1
-rw-r--r--docs/custom_test.rst6
-rw-r--r--docs/linux.rst22
3 files changed, 23 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index bcf9b9b..5c2486f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,4 +33,3 @@ script:
- python -m pytest -vvv
- python -m minishell_test -p /tmp/minishell
- python -m minishell_test -p /tmp/minishell -k pwd
- - python -m sphinx-build docs docs/_build
diff --git a/docs/custom_test.rst b/docs/custom_test.rst
index 32d3ec3..366fb88 100644
--- a/docs/custom_test.rst
+++ b/docs/custom_test.rst
@@ -70,7 +70,7 @@ Compare Files
Export Variables
++++++++++++++++
-Add environment variable passed to your executable with the ``exports`` dictionnary.
+Add environment variable passed to your executable with the ``exports`` dictionary.
.. note::
Those variables will be passed **in addition** of the default exports (i.e ``PATH`` and ``TERM``).
@@ -104,8 +104,8 @@ Output
return output.replace("foo", "bar")
test("echo @@foo foo foo@@", hook=replace_foo_by_bar_hook)
- # initial output: @@foo foo foo@@
- # after passedf through hook: @@bar bar bar@@
+ # initial output: @@foo foo foo@@
+ # after passed through hook: @@bar bar bar@@
Status Code
^^^^^^^^^^^
diff --git a/docs/linux.rst b/docs/linux.rst
index 97cff50..a994007 100644
--- a/docs/linux.rst
+++ b/docs/linux.rst
@@ -1,6 +1,24 @@
-
Linux
-----
-It will try to convert to output/status code of ``bash`` on Linux to the one on Mac.
+| The output and status codes will be converted to the one of ``bash`` OSX.
+| Although it mainly depends on your ``bash`` version (``3.2.57`` on the school's computers).
+
+Generally those differences are pretty minor, here is an example (``line n`` changes).
+
+Linux:
+
+.. code-block::
+
+ bash: -c: line 1: syntax error near unexpected token `newline'
+ bash: -c: line 1: `>'
+
+OSX:
+
+.. code-block::
+
+ bash: -c: line 0: syntax error near unexpected token `newline'
+ bash: -c: line 0: `>'
+.. note::
+ I've tried with ``bash5.1.4`` at home and most of the test are converted but don't be surprised if it's not the case for some of them.