Selaa lähdekoodia

Expected output

Jeremy Soller 7 vuotta sitten
vanhempi
commit
85766a41ff
45 muutettua tiedostoa jossa 40 lisäystä ja 0 poistoa
  1. 1 0
      tests/.gitignore
  2. 7 0
      tests/Makefile
  3. 0 0
      tests/expected/alloc.stderr
  4. 2 0
      tests/expected/alloc.stdout
  5. 0 0
      tests/expected/args.stderr
  6. 1 0
      tests/expected/args.stdout
  7. 0 0
      tests/expected/atof.stderr
  8. 1 0
      tests/expected/atof.stdout
  9. 0 0
      tests/expected/atoi.stderr
  10. 6 0
      tests/expected/atoi.stdout
  11. 0 0
      tests/expected/brk.stderr
  12. 1 0
      tests/expected/brk.stdout
  13. 0 0
      tests/expected/chdir.stderr
  14. 2 0
      tests/expected/chdir.stdout
  15. 0 0
      tests/expected/create.stderr
  16. 0 0
      tests/expected/create.stdout
  17. 0 0
      tests/expected/ctype.stderr
  18. 1 0
      tests/expected/ctype.stdout
  19. 0 0
      tests/expected/dup.stderr
  20. 1 0
      tests/expected/dup.stdout
  21. 1 0
      tests/expected/error.stderr
  22. 1 0
      tests/expected/error.stdout
  23. 0 0
      tests/expected/fchdir.stderr
  24. 1 0
      tests/expected/fchdir.stdout
  25. 0 0
      tests/expected/fcntl.stderr
  26. 1 0
      tests/expected/fcntl.stdout
  27. 0 0
      tests/expected/fsync.stderr
  28. 1 0
      tests/expected/fsync.stdout
  29. 0 0
      tests/expected/ftruncate.stderr
  30. 1 0
      tests/expected/ftruncate.stdout
  31. 0 0
      tests/expected/getid.stderr
  32. 1 0
      tests/expected/getid.stdout
  33. 0 0
      tests/expected/link.stderr
  34. 0 0
      tests/expected/link.stdout
  35. 0 0
      tests/expected/math.stderr
  36. 0 0
      tests/expected/math.stdout
  37. 0 0
      tests/expected/pipe.stderr
  38. 0 0
      tests/expected/pipe.stdout
  39. 0 0
      tests/expected/printf.stderr
  40. 8 0
      tests/expected/printf.stdout
  41. 0 0
      tests/expected/rmdir.stderr
  42. 1 0
      tests/expected/rmdir.stdout
  43. 0 0
      tests/expected/write.stderr
  44. 1 0
      tests/expected/write.stdout
  45. BIN
      tests/fcntl

+ 1 - 0
tests/.gitignore

@@ -11,6 +11,7 @@
 /dup.out
 /error
 /fchdir
+/fcntl
 /fsync
 /ftruncate
 /ftruncate.out

+ 7 - 0
tests/Makefile

@@ -26,9 +26,16 @@ all: $(BINS)
 clean:
 	rm -f $(BINS) *.out
 
+expected: $(BINS)
+	mkdir -p expected
+	for bin in $(BINS); do "./$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr"; done
+
 run: $(BINS)
 	for bin in $(BINS); do echo "# $${bin} #"; "./$${bin}" test args; done
 
+test: $(BINS)
+	for bin in $(BINS); do echo "# $${bin} #"; "./$${bin}" test args; done
+
 GCCHEAD=\
 	-nostdinc \
 	-nostdlib \

+ 0 - 0
tests/expected/alloc.stderr


+ 2 - 0
tests/expected/alloc.stdout

@@ -0,0 +1,2 @@
+malloc 0x55ac6c472618
+calloc 0x55ac6c472618

+ 0 - 0
tests/expected/args.stderr


+ 1 - 0
tests/expected/args.stdout

@@ -0,0 +1 @@
+./args test args 

+ 0 - 0
tests/expected/atof.stderr


+ 1 - 0
tests/expected/atof.stdout

@@ -0,0 +1 @@
+-3.14

+ 0 - 0
tests/expected/atoi.stderr


+ 6 - 0
tests/expected/atoi.stdout

@@ -0,0 +1,6 @@
+-42
+555
+1234567890
+-42
+555
+1234567890

+ 0 - 0
tests/expected/brk.stderr


+ 1 - 0
tests/expected/brk.stdout

@@ -0,0 +1 @@
+brk exited with status code 0

+ 0 - 0
tests/expected/chdir.stderr


+ 2 - 0
tests/expected/chdir.stdout

@@ -0,0 +1,2 @@
+initial cwd: /home/jeremy/Projects/relibc/tests
+final cwd: /home/jeremy/Projects/relibc

+ 0 - 0
tests/expected/create.stderr


+ 0 - 0
tests/expected/create.stdout


+ 0 - 0
tests/expected/ctype.stderr


+ 1 - 0
tests/expected/ctype.stdout

@@ -0,0 +1 @@
+Success: 0

+ 0 - 0
tests/expected/dup.stderr


+ 1 - 0
tests/expected/dup.stdout

@@ -0,0 +1 @@
+fd 4 duped into fd 5

+ 1 - 0
tests/expected/error.stderr

@@ -0,0 +1 @@
+perror: No such file or directory

+ 1 - 0
tests/expected/error.stdout

@@ -0,0 +1 @@
+errno: 2 = No such file or directory

+ 0 - 0
tests/expected/fchdir.stderr


+ 1 - 0
tests/expected/fchdir.stdout

@@ -0,0 +1 @@
+fchdir exited with status code 0

+ 0 - 0
tests/expected/fcntl.stderr


+ 1 - 0
tests/expected/fcntl.stdout

@@ -0,0 +1 @@
+fd 4 duped into fd 5

+ 0 - 0
tests/expected/fsync.stderr


+ 1 - 0
tests/expected/fsync.stdout

@@ -0,0 +1 @@
+fsync exited with status code 0

+ 0 - 0
tests/expected/ftruncate.stderr


+ 1 - 0
tests/expected/ftruncate.stdout

@@ -0,0 +1 @@
+ftruncate exited with status code 0

+ 0 - 0
tests/expected/getid.stderr


+ 1 - 0
tests/expected/getid.stdout

@@ -0,0 +1 @@
+egid: 1000, euid: 1000, gid: 1000, pgid: 23916, pid: 23933, ppid 23918, uid 1000

+ 0 - 0
tests/expected/link.stderr


+ 0 - 0
tests/expected/link.stdout


+ 0 - 0
tests/expected/math.stderr


+ 0 - 0
tests/expected/math.stdout


+ 0 - 0
tests/expected/pipe.stderr


+ 0 - 0
tests/expected/pipe.stdout


+ 0 - 0
tests/expected/printf.stderr


+ 8 - 0
tests/expected/printf.stdout

@@ -0,0 +1,8 @@
+percent: %
+string: String
+char: c
+int: -16
+uint: 32
+hex: beef
+HEX: C0FFEE
+string: end

+ 0 - 0
tests/expected/rmdir.stderr


+ 1 - 0
tests/expected/rmdir.stdout

@@ -0,0 +1 @@
+rmdir exited with status code 0

+ 0 - 0
tests/expected/write.stderr


+ 1 - 0
tests/expected/write.stdout

@@ -0,0 +1 @@
+Hello World!

BIN
tests/fcntl