diff --git a/test/fixtures/BCR2000.sc b/test/fixtures/BCR2000.sc new file mode 100644 index 00000000..f8f96a70 --- /dev/null +++ b/test/fixtures/BCR2000.sc @@ -0,0 +1,114 @@ +BCR2000 { + var controls, + controlBuses, + rangedControlBuses, + responders + ; + + *new { + ^super.new.init; + } + + init { + controls = Dictionary.new(108); + controlBuses = Dictionary.new(108); + rangedControlBuses = Dictionary.new(108); + + this.createCCResponders; + } + + createCCResponders { + responders = Array.fill(108, {|i| + CCResponder({|src, chan, num, val| + [src, chan, num, val].postln; + + // Write to controls + controls.put(i + 1, val); + + // Write to bus (converted to scalar 0..1) + controlBuses.put(i + 1, Bus.control(Server.default)); + controlBuses.at(i + 1).value = val / 127; + }, + // Adjust values as/if needed + nil, // src + nil, // chan + nil, // num + nil // value + ) + }); + } + + // Value from BCR + at {arg controlNum; + ^controls.at(controlNum) + } + + // Convert to 0..1 + scalarAt {arg controlNum; + ^controls.at(controlNum) / 127 + } + + // Get a bus + busAt {arg controlNum; + ^controlBuses.at(controlNum) + } + + /* + busRangeAt(arg controlNum, lo, hi; + if (rangedControlBuses.at(controlNum).isNil, { + rangedControlBuses.put(controlNum, Bus.control(Server.default)) + }); + + // Left to right order of operations + //rangedControlBuses.put( + bus.value = hi - lo * controls.at(controlNum) + lo; + + ^bus + } + */ +} + +/* Scratch +Dictionary +b = BCR2000(); +b.at(4); +b.scalarAt(4); +b.controls[5].get; +throw +z = Dictionary.new(2); +z.at(\1); +Array.fill(10, {|i| i.postln;}) +(2 + 3).asSymbol; + + +SynthDef(\x, { + arg amp = 0.01, + freq = 1200, + modDepth = 0.7, + modFreq = 2 + ; + + var + carrier, + modulator + ; + + modulator = SinOsc.ar(modFreq, mul: modDepth); + carrier = Saw.ar(freq, add: modulator, mul: amp); + + Out.ar([0,1], carrier) +}).store; + + +x = Synth(\x); +x.set(\modDepth, 1); +x.set(\modFreq, 64); + +x.map(\modFreq, b.busAt( + + + +ControlSpec +*/ + + diff --git a/test/fixtures/Foo.ml b/test/fixtures/Foo.ml new file mode 100644 index 00000000..fb9c7e98 --- /dev/null +++ b/test/fixtures/Foo.ml @@ -0,0 +1,82 @@ +(* + Copyright © 2011 MLstate + + This file is part of OPA. + + OPA is free software: you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License, version 3, as published by + the Free Software Foundation. + + OPA is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + more details. + + You should have received a copy of the GNU Affero General Public License + along with OPA. If not, see . +*) +(* + @author Louis Gesbert +**) + +type 'a t = ('a -> unit) -> unit + +module Ops = struct + let (@>) f k = f k + let (|>) x k = k x +end +open Ops + +module List = struct + let rec map f l k = match l with + | [] -> [] |> k + | hd::tl -> f hd @> fun hd -> map f tl @> fun tl -> hd::tl |> k + + let rec fold f acc l k = match l with + | [] -> acc |> k + | hd::tl -> f acc hd @> fun acc -> fold f acc tl @> k +end + +module Option = struct + let rec map f opt k = match opt with + | None -> None |> k + | Some x -> f x @> fun x -> Some x |> k +end + +module Lazy = struct + type 'a t = { + push : (unit -> unit) -> unit; + mutable value : 'a option; + mutable waiters : ('a -> unit) list; + cps : ('a -> unit) -> unit; + } + + let make push cps = { + push = push; + value = None; + waiters = []; + cps = cps; + } + + let force l k = + match l.value with + | Some x -> x |> k + | None when l.waiters != [] -> + l.waiters <- k::l.waiters + | None -> + l.waiters <- k::l.waiters; + l.cps + @> function x -> + Base.List.iter (fun k -> l.push (fun () -> k x)) l.waiters; + l.value <- Some x; + l.waiters <- [] + + let get_state cps = cps.value + + let lazy_from_val x = { + push = (fun _ -> ()); + value = Some x; + waiters = []; + cps = fun k -> k x; + } +end diff --git a/test/fixtures/Foo.sig b/test/fixtures/Foo.sig new file mode 100644 index 00000000..f881a5c6 --- /dev/null +++ b/test/fixtures/Foo.sig @@ -0,0 +1,27 @@ + +signature LAZY_BASE = + sig + type 'a lazy + exception Undefined + val force: 'a lazy -> 'a + val delay: (unit -> 'a) -> 'a lazy + val undefined: 'a lazy + end + +signature LAZY' = + sig + include LAZY_BASE + val isUndefined: 'a lazy -> bool + val inject : 'a -> 'a lazy + val toString: ('a -> string) -> 'a lazy -> string + val eq: ''a lazy * ''a lazy -> bool + val eqBy: ('a * 'a -> bool) -> 'a lazy * 'a lazy -> bool + val compare: ('a * 'a -> order) -> 'a lazy * 'a lazy -> order + val map: ('a -> 'b) -> 'a lazy -> 'b lazy + + structure Ops: + sig + val ! : 'a lazy -> 'a (* force *) + val ? : 'a -> 'a lazy (* inject *) + end + end diff --git a/test/fixtures/Foo.sml b/test/fixtures/Foo.sml new file mode 100644 index 00000000..2bbb789e --- /dev/null +++ b/test/fixtures/Foo.sml @@ -0,0 +1,75 @@ + +structure LazyBase:> LAZY_BASE = + struct + type 'a lazy = unit -> 'a + + exception Undefined + + fun delay f = f + + fun force f = f() + + val undefined = fn () => raise Undefined + end + +structure LazyMemoBase:> LAZY_BASE = + struct + + datatype 'a susp = NotYet of unit -> 'a + | Done of 'a + + type 'a lazy = unit -> 'a susp ref + + exception Undefined + + fun delay f = + let + val r = ref (NotYet f) + in + fn () => r + end + + fun force f = + case f() of + ref (Done x) => x + | r as ref (NotYet f') => + let + val a = f'() + in + r := Done a + ; a + end + + val undefined = fn () => raise Undefined + end + +functor LazyFn(B: LAZY_BASE): LAZY' = + struct + + open B + + fun inject x = delay (fn () => x) + + fun isUndefined x = + (ignore (force x) + ; false) + handle Undefined => true + + fun toString f x = if isUndefined x then "_|_" else f (force x) + + fun eqBy p (x,y) = p(force x,force y) + fun eq (x,y) = eqBy op= (x,y) + fun compare p (x,y) = p(force x,force y) + + structure Ops = + struct + val ! = force + val ? = inject + end + + fun map f x = delay (fn () => f (force x)) + + end + +structure Lazy' = LazyFn(LazyBase) +structure LazyMemo = LazyFn(LazyMemoBase) diff --git a/test/fixtures/asteroids.sps b/test/fixtures/asteroids.sps new file mode 100644 index 00000000..a4ae9955 --- /dev/null +++ b/test/fixtures/asteroids.sps @@ -0,0 +1,435 @@ +(import (rnrs) + (only (surfage s1 lists) filter-map) + (gl) + (glut) + (dharmalab records define-record-type) + (dharmalab math basic) + (agave glu compat) + (agave geometry pt) + (agave glamour window) + (agave glamour misc) + (surfage s19 time) + (surfage s27 random-bits) + (surfage s42 eager-comprehensions)) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; utilities +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define (say . args) + (for-each display args) + (newline)) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define (gl-translate-pt p) + (glTranslated (pt-x p) (pt-y p) 0.0)) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define (radians x) (* x (/ pi 180))) + +(define (degrees x) (* x (/ 180 pi))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define (angle->pt a) + (pt (cos a) + (sin a))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define (current-time-in-nanoseconds) + (let ((val (current-time))) + (+ (* (time-second val) 1000000000) + (time-nanosecond val)))) + +(define (current-time-in-seconds) + (/ (current-time-in-nanoseconds) + 1000.0 ;; micro + 1000.0 ;; milli + 1000.0)) + +(define base-time (current-time-in-seconds)) + +(define (time-step) (- (current-time-in-seconds) base-time)) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define score 0) + +(define level 1) + +(define ships 3) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; spaceship +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-record-type++ spaceship + (fields (mutable pos) + (mutable vel) + (mutable theta) + (mutable force))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; particle +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-record-type++ particle + (fields (mutable pos) + (mutable vel) + (mutable birth) + (mutable lifetime) + (mutable color))) + +(define particles '()) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; bullet +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-record-type++ bullet + (fields (mutable pos) + (mutable vel) + (mutable birth))) + +(define bullets '()) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; asteroid +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-record-type++ asteroid + (fields (mutable pos) + (mutable vel) + (mutable radius))) + +(define number-of-starting-asteroids 4) + +(define asteroids #f) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; bullet-pack +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-record-type++ bullet-pack + (fields (mutable pos) + (mutable vel))) + +(define pack #f) + +(is-bullet-pack pack) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(initialize-glut) + +(window (size 800 400) + (title "Asteroids") + (reshape (width height))) + +(random-source-randomize! default-random-source) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define (pt-wrap p) + (pt (mod (pt-x p) width) + (mod (pt-y p) height))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define ship + (make-spaceship (pt (/ width 2.0) (/ height 2.0)) + (pt 0.0 0.0) + 0.0 + 0.0)) + +(is-spaceship ship) + +(define ammo 0) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(set! asteroids + (list-ec (: i number-of-starting-asteroids) + (make-asteroid (pt (inexact (random-integer width)) + (inexact (random-integer height))) + (pt (inexact (+ -50 (random-integer 100))) + (inexact (+ -50 (random-integer 100)))) + 50.0))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(set! pack (make-bullet-pack (pt (inexact (random-integer width)) + (inexact (random-integer height))) + (pt (inexact (+ -50 (random-integer 100))) + (inexact (+ -50 (random-integer 100)))))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(buffered-display-procedure + (lambda () + (background 0.0) + + ;; ship + + (glColor3f 0.0 1.0 0.0) + + (gl-matrix-excursion + (gl-translate-pt ship.pos) + (glRotated 90.0 0.0 1.0 0.0) + (glRotated (degrees ship.theta) -1.0 0.0 0.0) + (glutWireCone 10.0 30.0 5 5)) + + ;; particles + + (for-each + (lambda (par) + + (let ((c (particle-color par))) + (glColor3f (vector-ref c 0) + (vector-ref c 1) + (vector-ref c 2))) + + (gl-matrix-excursion + (gl-translate-pt (particle-pos par)) + (glutWireSphere 2.0 5 5))) + particles) + + ;; bullets + + (glColor3f 0.0 0.0 1.0) + + (for-each + (lambda (bullet) + (gl-matrix-excursion + (gl-translate-pt (bullet-pos bullet)) + (glutWireSphere 5.0 10 10))) + bullets) + + ;; asteroids + + (glColor3f 1.0 0.0 0.0) + + (for-each + (lambda (asteroid) + (gl-matrix-excursion + (gl-translate-pt (asteroid-pos asteroid)) + (glutWireSphere (asteroid-radius asteroid) 10 10))) + asteroids) + + ;; bullet-pack + + (glColor3f 0.0 0.0 1.0) + + (gl-matrix-excursion + (gl-translate-pt pack.pos) + (glutWireCube 10.0)) + + )) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define last-time (current-time-in-seconds)) + +(define dt 0) + +(define (update-system) + + (set! dt (- (current-time-in-seconds) last-time)) + + (set! last-time (current-time-in-seconds)) + + (ship.pos! (pt-wrap (pt+ ship.pos (pt*n ship.vel dt)))) + + (pack.pos! (pt-wrap (pt+ pack.pos (pt*n pack.vel dt)))) + + (set! particles + (filter-map + (lambda (par) + (is-particle par) + (cond ((> (- (current-time-in-seconds) par.birth) par.lifetime) #f) + (else (par.pos! (pt+ par.pos (pt*n par.vel dt))) + par))) + particles)) + + (set! bullets + (filter-map + (lambda (bullet) + (is-bullet bullet) + (cond ((> (- (current-time-in-seconds) bullet.birth) 2.0) #f) + (else (bullet.pos! (pt+ bullet.pos (pt*n bullet.vel dt))) + bullet))) + bullets)) + + (set! asteroids + (filter-map + (lambda (a) + (is-asteroid a) + (a.pos! (pt-wrap (pt+ a.pos (pt*n a.vel dt)))) + (if (< a.radius 10.0) #f a)) + asteroids)) + + ;; bullet asteroid contact + + (for-each + (lambda (b) + (is-bullet b) + (for-each + (lambda (a) + (is-asteroid a) + (when (<= (pt-distance b.pos a.pos) + a.radius) + + (begin (set! score (+ score 1)) + (say "score: " score) + #f) + + (set! asteroids + (append + (list-ec (: i 4) + (make-asteroid a.pos + (pt (+ -50.0 (random-integer 100)) + (+ -50.0 (random-integer 100))) + (/ a.radius 2.0))) + asteroids)) + (a.radius! 0.1) + (b.birth! 0.0) + + (set! particles + (append (list-ec (: i 100) + (make-particle a.pos + (pt*n (angle->pt + (radians + (random-integer 360))) + + (random-integer 100) + + ) + (current-time-in-seconds) + 1.0 + (vector 1.0 1.0 1.0))) + particles)))) + asteroids)) + bullets) + + (for-each + (lambda (a) + (is-asteroid a) + (when (<= (pt-distance a.pos ship.pos) a.radius) + + (set! particles + (append (list-ec (: i 100) + (make-particle ship.pos + (pt*n (angle->pt + (radians + (random-integer 360))) + (random-integer 100)) + (current-time-in-seconds) + 1.0 + (vector 0.0 1.0 1.0))) + particles)) + + (set! ship (make-spaceship (pt (/ width 2.0) (/ height 2.0)) + (pt 0.0 0.0) + 0.0 + 0.0)) + + )) + asteroids) + + (when (null? asteroids) + (set! level (+ level 1)) + (display "level: ") + (display level) + (newline) + (set! asteroids + (list-ec (: i (+ number-of-starting-asteroids level)) + (make-asteroid (pt (inexact (random-integer width)) + (inexact (random-integer height))) + (pt (inexact (+ -50 (random-integer 100))) + (inexact (+ -50 (random-integer 100)))) + 50.0)))) + + ;; ship pack contact + + (when (<= (pt-distance ship.pos pack.pos) 10.0) + (set! ammo (+ ammo 5)) + (set! pack (make-bullet-pack (pt (inexact (random-integer width)) + (inexact (random-integer height))) + (pt (inexact (+ -50 (random-integer 100))) + (inexact (+ -50 (random-integer 100)))))) + (say "ammo: " ammo)) + + ) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(glutIdleFunc + (lambda () + (update-system) + (glutPostRedisplay))) + +(glutKeyboardFunc + (lambda (key x y) + (case (integer->char key) + + ((#\w) + + (ship.vel! (pt+ ship.vel (pt*n (angle->pt ship.theta) 50.0))) + + (set! particles + (append (list-ec (: i 10) + (make-particle ship.pos + (pt*n + (angle->pt + (+ ship.theta + (radians 180.0) + (radians (+ -45 (random-integer 90))) + )) + (random-integer 50) + ) + (current-time-in-seconds) + 1.0 + (vector 1.0 1.0 0.0))) + particles)) + + ) + + ((#\a) (ship.theta! (+ ship.theta (radians 20.0)))) + ((#\d) (ship.theta! (- ship.theta (radians 20.0)))) + + ((#\s) (ship.vel! (pt 0.0 0.0))) + + ((#\x) (ship.theta! (+ ship.theta (radians 180.0)))) + + ((#\space) + + (when (> ammo 0) + + (set! ammo (- ammo 1)) + + (set! bullets + (cons + (make-bullet ship.pos + (pt+ ship.vel + (pt*n (angle->pt ship.theta) 400.0)) + (current-time-in-seconds)) + bullets))) + + (say "ammo: " ammo) + ) + ))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(say "w - Thrusters") +(say "a/d - Left/Right") +(say "s - Stop") +(say "x - Flip") +(say "spc - Laser") + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(glutMainLoop) diff --git a/test/fixtures/cuda.cu b/test/fixtures/cuda.cu new file mode 100644 index 00000000..ddef40cd --- /dev/null +++ b/test/fixtures/cuda.cu @@ -0,0 +1,39 @@ +void foo() +{ + cudaArray* cu_array; + texture tex; + + // Allocate array + cudaChannelFormatDesc description = cudaCreateChannelDesc(); + cudaMallocArray(&cu_array, &description, width, height); + + // Copy image data to array + cudaMemcpyToArray(cu_array, image, width*height*sizeof(float), cudaMemcpyHostToDevice); + + // Set texture parameters (default) + tex.addressMode[0] = cudaAddressModeClamp; + tex.addressMode[1] = cudaAddressModeClamp; + tex.filterMode = cudaFilterModePoint; + tex.normalized = false; // do not normalize coordinates + + // Bind the array to the texture + cudaBindTextureToArray(tex, cu_array); + + // Run kernel + dim3 blockDim(16, 16, 1); + dim3 gridDim((width + blockDim.x - 1)/ blockDim.x, (height + blockDim.y - 1) / blockDim.y, 1); + kernel<<< gridDim, blockDim, 0 >>>(d_data, height, width); + + // Unbind the array from the texture + cudaUnbindTexture(tex); +} //end foo() + +__global__ void kernel(float* odata, int height, int width) +{ + unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; + unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; + if (x < width && y < height) { + float c = tex2D(tex, x, y); + odata[y*width+x] = c; + } +} diff --git a/test/fixtures/dog.o b/test/fixtures/dog.o new file mode 100755 index 00000000..47039766 Binary files /dev/null and b/test/fixtures/dog.o differ diff --git a/test/fixtures/file.json b/test/fixtures/file.json new file mode 100644 index 00000000..6d959030 --- /dev/null +++ b/test/fixtures/file.json @@ -0,0 +1 @@ +{"foo": "bar"} diff --git a/test/fixtures/foo bar.jar b/test/fixtures/foo bar.jar new file mode 100644 index 00000000..d3b48dfe Binary files /dev/null and b/test/fixtures/foo bar.jar differ diff --git a/test/fixtures/foo.bin b/test/fixtures/foo.bin new file mode 100644 index 00000000..d3b48dfe Binary files /dev/null and b/test/fixtures/foo.bin differ diff --git a/test/fixtures/foo.nim b/test/fixtures/foo.nim new file mode 100644 index 00000000..58b7f628 --- /dev/null +++ b/test/fixtures/foo.nim @@ -0,0 +1,3 @@ +# Hello world program + +echo "Hello world!" diff --git a/test/fixtures/foo.pdf b/test/fixtures/foo.pdf new file mode 100644 index 00000000..68c8d29e Binary files /dev/null and b/test/fixtures/foo.pdf differ diff --git a/test/fixtures/foo.png b/test/fixtures/foo.png new file mode 100644 index 00000000..a9ec5a27 Binary files /dev/null and b/test/fixtures/foo.png differ diff --git a/test/fixtures/git.deb b/test/fixtures/git.deb new file mode 100644 index 00000000..709e8282 Binary files /dev/null and b/test/fixtures/git.deb differ diff --git a/test/fixtures/git.exe b/test/fixtures/git.exe new file mode 100755 index 00000000..47039766 Binary files /dev/null and b/test/fixtures/git.exe differ diff --git a/test/fixtures/hello.ahk b/test/fixtures/hello.ahk new file mode 100644 index 00000000..ff963eb7 --- /dev/null +++ b/test/fixtures/hello.ahk @@ -0,0 +1 @@ +MsgBox, Hello`, World! diff --git a/test/fixtures/linguist.gem b/test/fixtures/linguist.gem new file mode 100644 index 00000000..04cc759e Binary files /dev/null and b/test/fixtures/linguist.gem differ diff --git a/test/fixtures/octocat.png b/test/fixtures/octocat.png new file mode 100644 index 00000000..a9ec5a27 Binary files /dev/null and b/test/fixtures/octocat.png differ diff --git a/test/fixtures/octocat.psd b/test/fixtures/octocat.psd new file mode 100644 index 00000000..910bd905 Binary files /dev/null and b/test/fixtures/octocat.psd differ diff --git a/test/fixtures/pkg/linguist.gem b/test/fixtures/pkg/linguist.gem new file mode 100644 index 00000000..04cc759e Binary files /dev/null and b/test/fixtures/pkg/linguist.gem differ diff --git a/test/test_blob.rb b/test/test_blob.rb index 26d116ad..ec01ba13 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -94,13 +94,13 @@ class TestBlob < Test::Unit::TestCase def test_text assert blob("README").text? + assert blob("dump.sql").text? assert blob("file.json").text? assert blob("file.txt").text? assert blob("md").text? assert blob("script.sh").text? assert blob("tender.md").text? assert blob("txt").text? - assert blob("zip").text? end def test_image