Permalink
Browse files

remove debug output and flush prompt to stdout

  • Loading branch information...
1 parent fb97752 commit 9d910637070c46427beba7af7eedd46d5430130d @koblenski committed Jan 12, 2017
Showing with 22 additions and 311 deletions.
  1. +7 −96 golden_output.txt
  2. +7 −100 golden_output_verbose.txt
  3. +7 −100 output.txt
  4. +1 −15 shell.cpp
View
@@ -1,9 +1,9 @@
-.
+koblensk> .
..
a.txt
b.txt
c.txt
-/bin/ls -a test
+koblensk> /bin/ls -a test
cat batch.txt
this is an invalid command
@@ -12,108 +12,19 @@ echo 123456789012345678901234567890123456789012345678901234567890123456789012345
echo 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 too long
exit invalid
exit
-koblensk> Command Line : /bin/ls -a test
- 0 : /bin/ls
- 1 : -a
- 2 : test
- 0 arg /bin/ls
- 1 arg -a
- 2 arg test
-/bin/ls
-/bin/ls
-koblensk> Command Line : cat batch.txt
- 0 : cat
- 1 : batch.txt
- 0 arg cat
- 1 arg batch.txt
-cat
-cat
-koblensk> Command Line : this is an invalid command
- 0 : this
- 1 : is
- 2 : an
- 3 : invalid
- 4 : command
- 0 arg this
- 1 arg is
- 2 arg an
- 3 arg invalid
- 4 arg command
-this
-this
-Doing execv this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
-Doing execv /usr/bin/this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
-Doing execv /bin/this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
-
+koblensk>
Command Not Found.
Please check your path and filename.
Note: programs needing user input cannot be executed with this shell.
-koblensk> Command Line : /bin/ls -a test
- 0 : /bin/ls
- 1 : -a
- 2 : test
- 0 arg /bin/ls
- 1 arg -a
- 2 arg test
-/bin/ls
-/bin/ls
-koblensk> Command Line : cat batch.txt
- 0 : cat
- 1 : batch.txt
- 0 arg cat
- 1 arg batch.txt
-cat
-cat
-koblensk> Command Line : this is an invalid command
- 0 : this
- 1 : is
- 2 : an
- 3 : invalid
- 4 : command
- 0 arg this
- 1 arg is
- 2 arg an
- 3 arg invalid
- 4 arg command
-this
-this
-koblensk> Command Line :
-koblensk> Command Line :
-koblensk> Command Line : echo 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
+koblensk> koblensk> koblensk>
Input exceeds valid command length.
Input must be at most 512 characters.
-koblensk> Command Line : echo 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
+koblensk>
Input exceeds valid command length.
Input must be at most 512 characters.
-koblensk> Command Line : exit invalid
- 0 : exit
- 1 : invalid
- 0 arg exit
- 1 arg invalid
-exit
-exit
-
+koblensk>
exit has too many arguments.
Type "exit" or press Ctrl-D to exit.
-koblensk> Command Line : exit
- 0 : exit
- 0 arg exit
-exit
-exit
+koblensk>
@@ -1,8 +1,10 @@
+koblensk> /bin/ls -a test
.
..
a.txt
b.txt
c.txt
+koblensk> cat batch.txt
/bin/ls -a test
cat batch.txt
this is an invalid command
@@ -12,116 +14,21 @@ echo 123456789012345678901234567890123456789012345678901234567890123456789012345
echo 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 too long
exit invalid
exit
-koblensk> Command Line : /bin/ls -a test
-/bin/ls -a test
- 0 : /bin/ls
- 1 : -a
- 2 : test
- 0 arg /bin/ls
- 1 arg -a
- 2 arg test
-/bin/ls
-/bin/ls
-koblensk> Command Line : cat batch.txt
-cat batch.txt
- 0 : cat
- 1 : batch.txt
- 0 arg cat
- 1 arg batch.txt
-cat
-cat
-koblensk> Command Line : this is an invalid command
-this is an invalid command
- 0 : this
- 1 : is
- 2 : an
- 3 : invalid
- 4 : command
- 0 arg this
- 1 arg is
- 2 arg an
- 3 arg invalid
- 4 arg command
-this
-this
-Doing execv this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
-Doing execv /usr/bin/this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
-Doing execv /bin/this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
+koblensk> this is an invalid command
Command Not Found.
Please check your path and filename.
Note: programs needing user input cannot be executed with this shell.
-koblensk> Command Line : /bin/ls -a test
-/bin/ls -a test
- 0 : /bin/ls
- 1 : -a
- 2 : test
- 0 arg /bin/ls
- 1 arg -a
- 2 arg test
-/bin/ls
-/bin/ls
-koblensk> Command Line : cat batch.txt
-cat batch.txt
- 0 : cat
- 1 : batch.txt
- 0 arg cat
- 1 arg batch.txt
-cat
-cat
-koblensk> Command Line : this is an invalid command
-this is an invalid command
- 0 : this
- 1 : is
- 2 : an
- 3 : invalid
- 4 : command
- 0 arg this
- 1 arg is
- 2 arg an
- 3 arg invalid
- 4 arg command
-this
-this
-koblensk> Command Line :
-koblensk> Command Line :
-koblensk> Command Line : echo 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
+koblensk> koblensk> koblensk>
Input exceeds valid command length.
Input must be at most 512 characters.
-koblensk> Command Line : echo 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
+koblensk>
Input exceeds valid command length.
Input must be at most 512 characters.
-koblensk> Command Line : exit invalid
-exit invalid
- 0 : exit
- 1 : invalid
- 0 arg exit
- 1 arg invalid
-exit
-exit
+koblensk> exit invalid
exit has too many arguments.
Type "exit" or press Ctrl-D to exit.
-koblensk> Command Line : exit
-exit
- 0 : exit
- 0 arg exit
-exit
-exit
+koblensk> exit
View
@@ -1,8 +1,10 @@
+koblensk> /bin/ls -a test
.
..
a.txt
b.txt
c.txt
+koblensk> cat batch.txt
/bin/ls -a test
cat batch.txt
this is an invalid command
@@ -12,116 +14,21 @@ echo 123456789012345678901234567890123456789012345678901234567890123456789012345
echo 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 too long
exit invalid
exit
-koblensk> Command Line : /bin/ls -a test
-/bin/ls -a test
- 0 : /bin/ls
- 1 : -a
- 2 : test
- 0 arg /bin/ls
- 1 arg -a
- 2 arg test
-/bin/ls
-/bin/ls
-koblensk> Command Line : cat batch.txt
-cat batch.txt
- 0 : cat
- 1 : batch.txt
- 0 arg cat
- 1 arg batch.txt
-cat
-cat
-koblensk> Command Line : this is an invalid command
-this is an invalid command
- 0 : this
- 1 : is
- 2 : an
- 3 : invalid
- 4 : command
- 0 arg this
- 1 arg is
- 2 arg an
- 3 arg invalid
- 4 arg command
-this
-this
-Doing execv this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
-Doing execv /usr/bin/this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
-Doing execv /bin/this
- 0 this
- 1 is
- 2 an
- 3 invalid
- 4 command
+koblensk> this is an invalid command
Command Not Found.
Please check your path and filename.
Note: programs needing user input cannot be executed with this shell.
-koblensk> Command Line : /bin/ls -a test
-/bin/ls -a test
- 0 : /bin/ls
- 1 : -a
- 2 : test
- 0 arg /bin/ls
- 1 arg -a
- 2 arg test
-/bin/ls
-/bin/ls
-koblensk> Command Line : cat batch.txt
-cat batch.txt
- 0 : cat
- 1 : batch.txt
- 0 arg cat
- 1 arg batch.txt
-cat
-cat
-koblensk> Command Line : this is an invalid command
-this is an invalid command
- 0 : this
- 1 : is
- 2 : an
- 3 : invalid
- 4 : command
- 0 arg this
- 1 arg is
- 2 arg an
- 3 arg invalid
- 4 arg command
-this
-this
-koblensk> Command Line :
-koblensk> Command Line :
-koblensk> Command Line : echo 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
+koblensk> koblensk> koblensk>
Input exceeds valid command length.
Input must be at most 512 characters.
-koblensk> Command Line : echo 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
+koblensk>
Input exceeds valid command length.
Input must be at most 512 characters.
-koblensk> Command Line : exit invalid
-exit invalid
- 0 : exit
- 1 : invalid
- 0 arg exit
- 1 arg invalid
-exit
-exit
+koblensk> exit invalid
exit has too many arguments.
Type "exit" or press Ctrl-D to exit.
-koblensk> Command Line : exit
-exit
- 0 : exit
- 0 arg exit
-exit
-exit
+koblensk> exit
Oops, something went wrong.

0 comments on commit 9d91063

Please sign in to comment.