Browse Source

issues on public

pull/1036/head
miguel 2 years ago
parent
commit
3969d79c84
  1. 16
      sh/tests/to-git-or-not-to-git_test.sh
  2. 3
      subjects/cat/README.md
  3. 2
      subjects/cl-camp6/README.md

16
sh/tests/to-git-or-not-to-git_test.sh

@ -4,8 +4,16 @@
set -euo pipefail
IFS='
'
FILENAME="student/to-git-or-not-to-git.sh"
submitted=$(bash student/to-git-or-not-to-git.sh)
expected=$(bash solutions/to-git-or-not-to-git.sh)
diff <(echo "$submitted") <(echo "$expected")
if [ -f ${FILENAME} ]; then
if [ -s ${FILENAME} ]; then
submitted=$(bash student/to-git-or-not-to-git.sh)
expected=$(bash solutions/to-git-or-not-to-git.sh)
diff <(echo "$submitted") <(echo "$expected")
else
echo "File exist but empty"
fi
else
echo "File does not exist"
fi

3
subjects/cat/README.md

@ -14,7 +14,8 @@ $ cat <<EOF> quest8T.txt
"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."
EOF
$ go run . abc
ERROR: abc: No such file or directory
ERROR: open abc: no such file or directory
exit status 1
$ go run . quest8.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
$ go run . quest8.txt abc

2
subjects/cl-camp6/README.md

@ -4,7 +4,7 @@
"Now, do your inventory"
Create a file `countfiles.sh`, which will print the number **(and only the number)** of regular files and folders contained in the current directory and its sub-folders :
Create a file `countfiles.sh`, which will print the number **(and only the number)** of regular files and folders contained in the current directory and its sub-folders (the current directory must be included in the count):
### Usage

Loading…
Cancel
Save