diff --git a/test/fixtures/.bash_profile b/test/fixtures/.bash_profile new file mode 100644 index 00000000..b7edb8ae --- /dev/null +++ b/test/fixtures/.bash_profile @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/test/fixtures/.bashrc b/test/fixtures/.bashrc new file mode 100644 index 00000000..b7edb8ae --- /dev/null +++ b/test/fixtures/.bashrc @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/test/fixtures/.gemrc b/test/fixtures/.gemrc new file mode 100644 index 00000000..821e54ae --- /dev/null +++ b/test/fixtures/.gemrc @@ -0,0 +1,5 @@ +gem: --local --gen-rdoc --run-tests +rdoc: --inline-source --line-numbers +gempath: + - /usr/local/rubygems + - /home/gavin/.rubygems diff --git a/test/fixtures/.gitconfig b/test/fixtures/.gitconfig new file mode 100644 index 00000000..c5839798 --- /dev/null +++ b/test/fixtures/.gitconfig @@ -0,0 +1,3 @@ +[user] + name = Josh Peek + email = josh@github.com diff --git a/test/fixtures/.gvimrc b/test/fixtures/.gvimrc new file mode 100644 index 00000000..d4efd33e --- /dev/null +++ b/test/fixtures/.gvimrc @@ -0,0 +1,2 @@ +" no toolbar +set guioptions-=T diff --git a/test/fixtures/.profile b/test/fixtures/.profile new file mode 100644 index 00000000..b7edb8ae --- /dev/null +++ b/test/fixtures/.profile @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/test/fixtures/.vimrc b/test/fixtures/.vimrc new file mode 100644 index 00000000..2e9f626c --- /dev/null +++ b/test/fixtures/.vimrc @@ -0,0 +1,8 @@ +set nocompatible +set ignorecase +set incsearch +set smartcase +set showmatch +set showcmd + +syntax on diff --git a/test/fixtures/.zlogin b/test/fixtures/.zlogin new file mode 100644 index 00000000..b7edb8ae --- /dev/null +++ b/test/fixtures/.zlogin @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/test/fixtures/.zshrc b/test/fixtures/.zshrc new file mode 100644 index 00000000..b7edb8ae --- /dev/null +++ b/test/fixtures/.zshrc @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/test/fixtures/build.gradle b/test/fixtures/build.gradle new file mode 100644 index 00000000..c1ac812c --- /dev/null +++ b/test/fixtures/build.gradle @@ -0,0 +1,17 @@ +task echoDirListViaAntBuilder() { + description = 'Uses the built-in AntBuilder instance to echo and list files' + //Docs: http://ant.apache.org/manual/Types/fileset.html + + //Echo the Gradle project name via the ant echo plugin + ant.echo(message: project.name) + ant.echo(path) + ant.echo("${projectDir}/samples") + + //Gather list of files in a subdirectory + ant.fileScanner{ + fileset(dir:"samples") + }.each{ + //Print each file to screen with the CWD (projectDir) path removed. + println it.toString() - "${projectDir}" + } +} diff --git a/test/fixtures/build.sbt b/test/fixtures/build.sbt new file mode 100644 index 00000000..16e7902f --- /dev/null +++ b/test/fixtures/build.sbt @@ -0,0 +1,169 @@ +// set the name of the project +name := "My Project" + +version := "1.0" + +organization := "org.myproject" + +// add a test dependency on ScalaCheck +libraryDependencies += "org.scala-tools.testing" %% "scalacheck" % "1.8" % "test" + +// add compile dependencies on some dispatch modules +libraryDependencies ++= Seq( + "net.databinder" %% "dispatch-meetup" % "0.7.8", + "net.databinder" %% "dispatch-twitter" % "0.7.8" +) + +// Set a dependency based partially on a val. +{ + val libosmVersion = "2.5.2-RC1" + libraryDependencies += "net.sf.travelingsales" % "osmlib" % libosmVersion from "http://downloads.sourceforge.net/project/travelingsales/libosm/"+libosmVersion+"/libosm-"+libosmVersion+".jar" +} + +// reduce the maximum number of errors shown by the Scala compiler +maxErrors := 20 + +// increase the time between polling for file changes when using continuous execution +pollInterval := 1000 + +// append several options to the list of options passed to the Java compiler +javacOptions ++= Seq("-source", "1.5", "-target", "1.5") + +// append -deprecation to the options passed to the Scala compiler +scalacOptions += "-deprecation" + +// set the Scala version used for the project +scalaVersion := "2.9.0-SNAPSHOT" + +// define the statements initially evaluated when entering 'console', 'console-quick', or 'console-project' +initialCommands := """ + import System.{currentTimeMillis => now} + def time[T](f: => T): T = { + val start = now + try { f } finally { println("Elapsed: " + (now - start)/1000.0 + " s") } + } +""" + +// set the initial commands when entering 'console' only +initialCommands in console := "import myproject._" + +// set the main class for packaging the main jar +// 'run' will still auto-detect and prompt +// change Compile to Test to set it for the test jar +mainClass in (Compile, packageBin) := Some("myproject.MyMain") + +// set the main class for the main 'run' task +// change Compile to Test to set it for 'test:run' +mainClass in (Compile, run) := Some("myproject.MyMain") + +// add /input to the files that '~' triggers on +watchSources <+= baseDirectory map { _ / "input" } + +// add a maven-style repository +resolvers += "name" at "url" + +// add a sequence of maven-style repositories +resolvers ++= Seq("name" at "url") + +// define the repository to publish to +publishTo := Some("name" at "url") + +// set Ivy logging to be at the highest level +ivyLoggingLevel := UpdateLogging.Full + +// disable updating dynamic revisions (including -SNAPSHOT versions) +offline := true + +// set the prompt (for this build) to include the project id. +shellPrompt in ThisBuild := { state => Project.extract(state).currentRef.project + "> " } + +// set the prompt (for the current project) to include the username +shellPrompt := { state => System.getProperty("user.name") + "> " } + +// disable printing timing information, but still print [success] +showTiming := false + +// disable printing a message indicating the success or failure of running a task +showSuccess := false + +// change the format used for printing task completion time +timingFormat := { + import java.text.DateFormat + DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT) +} + +// disable using the Scala version in output paths and artifacts +crossPaths := false + +// fork a new JVM for 'run' and 'test:run' +fork := true + +// fork a new JVM for 'test:run', but not 'run' +fork in Test := true + +// add a JVM option to use when forking a JVM for 'run' +javaOptions += "-Xmx2G" + +// only use a single thread for building +parallelExecution := false + +// Execute tests in the current project serially +// Tests from other projects may still run concurrently. +parallelExecution in Test := false + +// set the location of the JDK to use for compiling Java code. +// if 'fork' is true, this is used for 'run' as well +javaHome := Some(file("/usr/lib/jvm/sun-jdk-1.6")) + +// Use Scala from a directory on the filesystem instead of retrieving from a repository +scalaHome := Some(file("/home/user/scala/trunk/")) + +// don't aggregate clean (See FullConfiguration for aggregation details) +aggregate in clean := false + +// only show warnings and errors on the screen for compilations. +// this applies to both test:compile and compile and is Info by default +logLevel in compile := Level.Warn + +// only show warnings and errors on the screen for all tasks (the default is Info) +// individual tasks can then be more verbose using the previous setting +logLevel := Level.Warn + +// only store messages at info and above (the default is Debug) +// this is the logging level for replaying logging with 'last' +persistLogLevel := Level.Debug + +// only show 10 lines of stack traces +traceLevel := 10 + +// only show stack traces up to the first sbt stack frame +traceLevel := 0 + +// add SWT to the unmanaged classpath +unmanagedJars in Compile += file("/usr/share/java/swt.jar") + +// publish test jar, sources, and docs +publishArtifact in Test := true + +// disable publishing of main docs +publishArtifact in (Compile, packageDoc) := false + +// change the classifier for the docs artifact +artifactClassifier in packageDoc := Some("doc") + +// Copy all managed dependencies to /lib_managed/ +// This is essentially a project-local cache and is different +// from the lib_managed/ in sbt 0.7.x. There is only one +// lib_managed/ in the build root (not per-project). +retrieveManaged := true + +/* Specify a file containing credentials for publishing. The format is: +realm=Sonatype Nexus Repository Manager +host=nexus.scala-tools.org +user=admin +password=admin123 +*/ +credentials += Credentials(Path.userHome / ".ivy2" / ".credentials") + +// Directly specify credentials for publishing. +credentials += Credentials("Sonatype Nexus Repository Manager", "nexus.scala-tools.org", "admin", "admin123") diff --git a/test/fixtures/center.applescript b/test/fixtures/center.applescript new file mode 100644 index 00000000..3049271b --- /dev/null +++ b/test/fixtures/center.applescript @@ -0,0 +1,50 @@ +set windowWidth to 800 +set windowHeight to 600 +delay 0.1 + +set AppleScript's text item delimiters to "x" + +set res to text returned of (display dialog "Enter the width x height:" default answer ((windowWidth & windowHeight) as text)) + +if res is "" then + display dialog "You need to enter a correct response" + return +end if +set {windowWidth, windowHeight} to text items of res + +set AppleScript's text item delimiters to "" + +tell application "Safari" + set screen_width to (do JavaScript "screen.availWidth" in document 1) + set screen_height to (do JavaScript "screen.availHeight" in document 1) +end tell + +tell application "System Events" + set myFrontMost to name of first item of (processes whose frontmost is true) +end tell + +tell application "Finder" + set {desktopTop, desktopLeft, desktopRight, desktopBottom} to bounds of desktop +end tell + +try + tell application "System Events" + tell process myFrontMost + set {{w, h}} to size of drawer of window 1 + end tell + end tell +on error + set {w, h} to {0, 0} +end try + +tell application "System Events" + tell process myFrontMost + try + set {{w, h}} to size of drawer of window 1 + on error + set {w, h} to {0, 0} + end try + set position of window 1 to {((screen_width - windowWidth) / 2), ((screen_height - windowHeight) / 2.0) - desktopTop} + set size of window 1 to {windowWidth -w, windowHeight} + end tell +end tell \ No newline at end of file diff --git a/test/fixtures/center.scpt b/test/fixtures/center.scpt new file mode 100644 index 00000000..3049271b --- /dev/null +++ b/test/fixtures/center.scpt @@ -0,0 +1,50 @@ +set windowWidth to 800 +set windowHeight to 600 +delay 0.1 + +set AppleScript's text item delimiters to "x" + +set res to text returned of (display dialog "Enter the width x height:" default answer ((windowWidth & windowHeight) as text)) + +if res is "" then + display dialog "You need to enter a correct response" + return +end if +set {windowWidth, windowHeight} to text items of res + +set AppleScript's text item delimiters to "" + +tell application "Safari" + set screen_width to (do JavaScript "screen.availWidth" in document 1) + set screen_height to (do JavaScript "screen.availHeight" in document 1) +end tell + +tell application "System Events" + set myFrontMost to name of first item of (processes whose frontmost is true) +end tell + +tell application "Finder" + set {desktopTop, desktopLeft, desktopRight, desktopBottom} to bounds of desktop +end tell + +try + tell application "System Events" + tell process myFrontMost + set {{w, h}} to size of drawer of window 1 + end tell + end tell +on error + set {w, h} to {0, 0} +end try + +tell application "System Events" + tell process myFrontMost + try + set {{w, h}} to size of drawer of window 1 + on error + set {w, h} to {0, 0} + end try + set position of window 1 to {((screen_width - windowWidth) / 2), ((screen_height - windowHeight) / 2.0) - desktopTop} + set size of window 1 to {windowWidth -w, windowHeight} + end tell +end tell \ No newline at end of file diff --git a/test/fixtures/dump.sql b/test/fixtures/dump.sql new file mode 100644 index 00000000..2e959c0d --- /dev/null +++ b/test/fixtures/dump.sql @@ -0,0 +1 @@ +DROP ALL TABLES diff --git a/test/fixtures/fft.cl b/test/fixtures/fft.cl new file mode 100644 index 00000000..e18c6e0e --- /dev/null +++ b/test/fixtures/fft.cl @@ -0,0 +1,13 @@ +double run_fftw(int n,const float * x,float * y) +{ + fftwf_plan p1 = fftwf_plan_dft_1d(n,(fftwf_complex *)x,(fftwf_complex *)y, + FFTW_FORWARD,FFTW_ESTIMATE); + const int nops = 10; + double t = cl::realTime(); + for (int op = 0;op < nops;op++) { + fftwf_execute(p1); + } + t = (cl::realTime() - t)/(double)nops; + fftwf_destroy_plan(p1); + return t; +} diff --git a/test/fixtures/github.po b/test/fixtures/github.po new file mode 100644 index 00000000..772ecc07 --- /dev/null +++ b/test/fixtures/github.po @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: x\n" +"POT-Creation-Date: 2009-02-15 09:22+0100\n" +"PO-Revision-Date: 2009-02-15 09:22+0100\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: tools/files/simple_translation.rb:1 +msgid "a translation" +msgstr "" diff --git a/test/fixtures/md b/test/fixtures/md new file mode 100644 index 00000000..35624980 --- /dev/null +++ b/test/fixtures/md @@ -0,0 +1,2 @@ +MD +== diff --git a/test/fixtures/program.dpr b/test/fixtures/program.dpr new file mode 100644 index 00000000..d2d71f14 --- /dev/null +++ b/test/fixtures/program.dpr @@ -0,0 +1,14 @@ +program gmail; + +uses + Forms, + Unit2 in 'Unit2.pas' {Form2}; + +{$R *.res} + +begin + Application.Initialize; + Application.MainFormOnTaskbar := True; + Application.CreateForm(TForm2, Form2); + Application.Run; +end. diff --git a/test/fixtures/scribble.scrbl b/test/fixtures/scribble.scrbl new file mode 100644 index 00000000..9c4d0e2a --- /dev/null +++ b/test/fixtures/scribble.scrbl @@ -0,0 +1,33 @@ +#lang scribble/manual +@(require scribble/bnf "utils.rkt") + +@title{Scribble: The Racket Documentation Tool} + +@author["Matthew Flatt" "Eli Barzilay"] + +Scribble is a collection of tools for creating prose +documents---papers, books, library documentation, etc.---in HTML or +PDF (via Latex) form. More generally, Scribble helps you write +programs that are rich in textual content, whether the content is +prose to be typeset or any other form of text to be generated +programmatically. + +This document is itself written using Scribble. You can see its source +at +@(let ([url "http://git.racket-lang.org/plt/tree/HEAD:/collects/scribblings/scribble"]) + (link url url)), +starting with the @filepath{scribble.scrbl} file. + +@table-of-contents[] + +@; ------------------------------------------------------------------------ +@include-section["how-to-paper.scrbl"] +@include-section["reader.scrbl"] +@include-section["generic.scrbl"] +@include-section["plt.scrbl"] +@include-section["lp.scrbl"] +@include-section["text.scrbl"] +@include-section["internals.scrbl"] +@include-section["running.scrbl"] + +@index-section[] diff --git a/test/fixtures/tender.md b/test/fixtures/tender.md new file mode 100644 index 00000000..82d3a02b --- /dev/null +++ b/test/fixtures/tender.md @@ -0,0 +1,2 @@ +Tender +====== diff --git a/test/fixtures/txt b/test/fixtures/txt new file mode 100644 index 00000000..3de705a4 --- /dev/null +++ b/test/fixtures/txt @@ -0,0 +1 @@ +Text diff --git a/test/fixtures/xproc.xqm b/test/fixtures/xproc.xqm new file mode 100644 index 00000000..13257b2f --- /dev/null +++ b/test/fixtures/xproc.xqm @@ -0,0 +1,70 @@ +(: ------------------------------------------------------------------------------------- + + xproc.xqm - core xqm contains entry points, primary eval-step function and + control functions. + + ---------------------------------------------------------------------------------------- :) +xquery version "3.0" encoding "UTF-8"; + +module namespace xproc = "http://xproc.net/xproc"; + + (: declare namespaces :) + declare namespace p="http://www.w3.org/ns/xproc"; + declare namespace c="http://www.w3.org/ns/xproc-step"; + declare namespace err="http://www.w3.org/ns/xproc-error"; + + (: module imports :) +(: import module namespace util = "http://xproc.net/xproc/util" at "util1.xqm"; :) + import module namespace const = "http://xproc.net/xproc/const" at "const.xqm"; + import module namespace parse = "http://xproc.net/xproc/parse" at "parse.xqm"; + import module namespace u = "http://xproc.net/xproc/util" at "util.xqm"; + + (: declare options :) + declare boundary-space preserve; + declare option saxon:output "indent=yes"; + + (: declare functions :) + declare variable $xproc:run-step := xproc:run#6; + declare variable $xproc:parse-and-eval := (); + declare variable $xproc:declare-step := (); + declare variable $xproc:choose := (); + declare variable $xproc:try := (); + declare variable $xproc:catch := (); + declare variable $xproc:group := (); + declare variable $xproc:for-each := (); + declare variable $xproc:viewport := (); + declare variable $xproc:library := (); + declare variable $xproc:pipeline := (); + declare variable $xproc:variable := (); + + + (: list all declared namespaces :) + (: -------------------------------------------------------------------------- :) + declare function xproc:enum-namespaces($pipeline){ + (: -------------------------------------------------------------------------- :) + {u:enum-ns({$pipeline})} + }; + + (: entry point :) + (: -------------------------------------------------------------------------- :) + declare function xproc:run($pipeline,$stdin,$dflag,$tflag,$bindings,$options){ + (: -------------------------------------------------------------------------- :) + + (: STEP I: preprocess :) + let $validate := () + let $namespaces := xproc:enum-namespaces($pipeline) + let $parse := parse:explicit-bindings( parse:AST(parse:explicit-name(parse:explicit-type($pipeline)))) + let $ast := element p:declare-step {$parse/@*, + parse:pipeline-step-sort( $parse/*, () ) + } + + (: STEP II: eval AST :) + let $eval_result := () + + (: STEP III: serialize and return results :) + let $serialized_result := $pipeline + + return + $serialized_result + }; + diff --git a/test/fixtures/zip b/test/fixtures/zip new file mode 100644 index 00000000..d3b48dfe Binary files /dev/null and b/test/fixtures/zip differ