From: W. Trevor King Date: Tue, 5 Feb 2013 19:10:03 +0000 (-0500) Subject: quizzes/posix-utilities: Rename from posix-shell.json and flesh out X-Git-Tag: v0.1~53 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0aad5705f1a0f83a6788654592bbcb288c5261cb;p=quizzer.git quizzes/posix-utilities: Rename from posix-shell.json and flesh out Added few more questions: * print the current directory to stdout * change to your home directory * change to the parent of your current working directory * print the contents of README file to the terminal The renaming is because the tests are testing knowledge of POSIX utilities, not knowledge of the shell syntax itself. --- diff --git a/quizzes/posix-shell.json b/quizzes/posix-shell.json deleted file mode 100644 index 192958c..0000000 --- a/quizzes/posix-shell.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "version": "0.1", - "questions": [ - { - "class": "ScriptQuestion", - "interpreter": "sh", - "prompt": "list all the files in the current directory", - "answer": "ls", - "setup": [ - "touch file-1 file-2 file-3" - ], - "help": "http://pubs.opengroup.org/onlinepubs/009696699/idx/utilities.html" - } - ] -} diff --git a/quizzes/posix-utilities.json b/quizzes/posix-utilities.json new file mode 100644 index 0000000..43c30af --- /dev/null +++ b/quizzes/posix-utilities.json @@ -0,0 +1,58 @@ +{ + "version": "0.1", + "questions": [ + { + "class": "ScriptQuestion", + "interpreter": "sh", + "prompt": "list all the files in the current directory", + "answer": "ls", + "setup": [ + "touch file-1 file-2 file-3" + ], + "help": "http://pubs.opengroup.org/onlinepubs/009696699/idx/utilities.html" + }, + { + "class": "ScriptQuestion", + "interpreter": "sh", + "prompt": "print the current directory to stdout", + "answer": "pwd", + "help": "http://pubs.opengroup.org/onlinepubs/009696699/idx/utilities.html" + }, + { + "class": "ScriptQuestion", + "interpreter": "sh", + "prompt": "change to your home directory", + "answer": "cd", + "teardown": [ + "pwd" + ], + "help": "http://pubs.opengroup.org/onlinepubs/009696699/idx/utilities.html" + }, + { + "class": "ScriptQuestion", + "interpreter": "sh", + "prompt": "change to the parent of your current working directory", + "answer": "cd ..", + "teardown": [ + "pwd" + ], + "help": "http://pubs.opengroup.org/onlinepubs/009696699/idx/utilities.html", + "dependencies": [ + "change to your home directory" + ] + }, + { + "class": "ScriptQuestion", + "interpreter": "sh", + "prompt": "print the contents of README file to the terminal", + "answer": "cat README", + "setup": [ + "echo 'This project is wonderful' > README" + ], + "help": "The README file is in your current directory.\nhttp://pubs.opengroup.org/onlinepubs/009696699/idx/utilities.html", + "dependencies": [ + "list all the files in the current directory" + ] + } + ] +}