Commits

David Krentzlin committed b172b1f

removed spec-file

Comments (0)

Files changed (3)

strategies/sendfile.bsd.scm

-(foreign-declare "#include<sys/socket.h>\n#include<sys/types.h>#include <sys/uio.h>")
+(foreign-declare "
+#define _XOPEN_SOURCE 600
+#include<sys/socket.h>
+#include<sys/types.h>
+#include <sys/uio.h>")
+
 (cond-expand
   (posix-fadvise
    (foreign-declare "#define READ_AHEAD (4 * 1024 * 1024)")

strategies/sendfile.linux.scm

-(foreign-declare "#include <sys/sendfile.h>\n#define _XOPEN_SOURCE 600\n#include <fcntl.h>\n#include<errno.h>")
+(foreign-declare "
+#define _XOPEN_SOURCE 600
+#include <sys/sendfile.h>
+#include <fcntl.h>
+#include<errno.h>")
 (cond-expand
   (posix-fadvise
    (foreign-declare "#define READ_AHEAD (4 * 1024 * 1024)")

tests/sendfile-spec.scm

-(load "spec-helper.scm")
-
-(define (megabytes n)
-  (* n 1024 1024))
-
-(define (transmits-correctly)
-  (let ((server-side-checksum #f)
-        (expected-checksum #f))
-    (matcher
-     (check (subject)
-            (with-running-server
-             (lambda ()
-               (call-with-temporary-file/checksum (force subject)
-                                                  (lambda (file-path checksum)
-                                                    (set! expected-checksum checksum)
-                                                    (set! server-side-checksum (stream-file file-path (string-length (force subject))))
-                                                    (string=? server-side-checksum checksum))))))
-     (message (form subject negate)
-              (with-output-to-string
-                (lambda ()
-                  (printf "Checksum missmatch. Expected ~A but got ~A" expected-checksum server-side-checksum)))))))
-
-
-
-   
-  (context "Sendfile"
-    (it "can send files greater than 1 mb" (meta ((bug . 727)))
-        (expect (generate-buffer (megabytes 2)) (transmits-correctly))))
-
-
-