Index: modules/benchmark/conf/sort-standard.alg
===================================================================
--- modules/benchmark/conf/sort-standard.alg	(revision 1243650)
+++ modules/benchmark/conf/sort-standard.alg	(working copy)
@@ -50,7 +50,7 @@
       { "Populate"
         -CreateIndex
         { "MAddDocs" AddDoc(100) > : 500000
-        -ForcMerge(1)
+        -ForceMerge(1)
         -CloseIndex
       }
     
Index: modules/benchmark/conf/collector-small.alg
===================================================================
--- modules/benchmark/conf/collector-small.alg	(revision 1243650)
+++ modules/benchmark/conf/collector-small.alg	(working copy)
@@ -52,7 +52,7 @@
     { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 200000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/conf/indexing.alg
===================================================================
--- modules/benchmark/conf/indexing.alg	(revision 1243650)
+++ modules/benchmark/conf/indexing.alg	(working copy)
@@ -54,7 +54,7 @@
     { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/conf/highlight-profile.alg
===================================================================
--- modules/benchmark/conf/highlight-profile.alg	(revision 1243650)
+++ modules/benchmark/conf/highlight-profile.alg	(working copy)
@@ -44,7 +44,7 @@
 { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 { "Rounds"
Index: modules/benchmark/conf/indexing-flush-by-RAM.alg
===================================================================
--- modules/benchmark/conf/indexing-flush-by-RAM.alg	(revision 1243650)
+++ modules/benchmark/conf/indexing-flush-by-RAM.alg	(working copy)
@@ -54,7 +54,7 @@
     { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/conf/sample.alg
===================================================================
--- modules/benchmark/conf/sample.alg	(revision 1243650)
+++ modules/benchmark/conf/sample.alg	(working copy)
@@ -62,7 +62,7 @@
     { "PopulateShort"
         CreateIndex
         { AddDoc(4000) > : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     >
 
@@ -71,7 +71,7 @@
     { "PopulateLong"
         CreateIndex
         { AddDoc(8000) > : 10000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     >
 
Index: modules/benchmark/conf/highlight-vs-vector-highlight.alg
===================================================================
--- modules/benchmark/conf/highlight-vs-vector-highlight.alg	(revision 1243650)
+++ modules/benchmark/conf/highlight-vs-vector-highlight.alg	(working copy)
@@ -48,7 +48,7 @@
 { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
 }
 {
Index: modules/benchmark/conf/standard-highlights-notv.alg
===================================================================
--- modules/benchmark/conf/standard-highlights-notv.alg	(revision 1243650)
+++ modules/benchmark/conf/standard-highlights-notv.alg	(working copy)
@@ -44,7 +44,7 @@
 { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
 }
 { "Rounds"
Index: modules/benchmark/conf/analyzer.alg
===================================================================
--- modules/benchmark/conf/analyzer.alg	(revision 1243650)
+++ modules/benchmark/conf/analyzer.alg	(working copy)
@@ -55,7 +55,7 @@
     { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc > : 2000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/conf/collector.alg
===================================================================
--- modules/benchmark/conf/collector.alg	(revision 1243650)
+++ modules/benchmark/conf/collector.alg	(working copy)
@@ -52,7 +52,7 @@
     { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 2000000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/conf/standard-flush-by-RAM.alg
===================================================================
--- modules/benchmark/conf/standard-flush-by-RAM.alg	(revision 1243650)
+++ modules/benchmark/conf/standard-flush-by-RAM.alg	(working copy)
@@ -53,7 +53,7 @@
     { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/conf/micro-standard.alg
===================================================================
--- modules/benchmark/conf/micro-standard.alg	(revision 1243650)
+++ modules/benchmark/conf/micro-standard.alg	(working copy)
@@ -52,7 +52,7 @@
     { "Populate"
         -CreateIndex
         { "MAddDocs" AddDoc > : 2000
-        -ForcMerge(1)
+        -ForceMerge(1)
         -CloseIndex
     }
 
Index: modules/benchmark/conf/standard-highlights-tv.alg
===================================================================
--- modules/benchmark/conf/standard-highlights-tv.alg	(revision 1243650)
+++ modules/benchmark/conf/standard-highlights-tv.alg	(working copy)
@@ -44,7 +44,7 @@
 { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
 }
 { "Rounds"
Index: modules/benchmark/conf/indexing-multithreaded.alg
===================================================================
--- modules/benchmark/conf/indexing-multithreaded.alg	(revision 1243650)
+++ modules/benchmark/conf/indexing-multithreaded.alg	(working copy)
@@ -54,7 +54,7 @@
     { "Populate"
         CreateIndex
         [{ "MAddDocs" AddDoc } : 5000] : 4
-        ForcMerge(1)
+        ForceMerge(1)
         CommitIndex(commit1)
         CloseIndex
     }
Index: modules/benchmark/conf/standard.alg
===================================================================
--- modules/benchmark/conf/standard.alg	(revision 1243650)
+++ modules/benchmark/conf/standard.alg	(working copy)
@@ -53,7 +53,7 @@
     { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/conf/indexing-flush-by-RAM-multithreaded.alg
===================================================================
--- modules/benchmark/conf/indexing-flush-by-RAM-multithreaded.alg	(revision 1243650)
+++ modules/benchmark/conf/indexing-flush-by-RAM-multithreaded.alg	(working copy)
@@ -54,7 +54,7 @@
     { "Populate"
         CreateIndex
         [{ "MAddDocs" AddDoc } : 5000] : 4
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/conf/facets.alg
===================================================================
--- modules/benchmark/conf/facets.alg	(revision 1243650)
+++ modules/benchmark/conf/facets.alg	(working copy)
@@ -52,7 +52,7 @@
       -CreateIndex
       -CreateTaxonomyIndex
       { "MAddDocs" AddFacetedDoc > : *
-      -ForcMerge(1)
+      -ForceMerge(1)
       -CloseIndex
       -CloseTaxonomyIndex
   }
Index: modules/benchmark/conf/vector-highlight-profile.alg
===================================================================
--- modules/benchmark/conf/vector-highlight-profile.alg	(revision 1243650)
+++ modules/benchmark/conf/vector-highlight-profile.alg	(working copy)
@@ -44,7 +44,7 @@
 { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc } : 20000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 { "Rounds"
Index: modules/benchmark/conf/sloppy-phrase.alg
===================================================================
--- modules/benchmark/conf/sloppy-phrase.alg	(revision 1243650)
+++ modules/benchmark/conf/sloppy-phrase.alg	(working copy)
@@ -52,7 +52,7 @@
 { "Populate"
     CreateIndex
     { "MAddDocs" AddDoc(2000) > : 20000     
-    ForcMerge(1)
+    ForceMerge(1)
     CloseIndex
 }
 
Index: modules/benchmark/conf/micro-standard-flush-by-ram.alg
===================================================================
--- modules/benchmark/conf/micro-standard-flush-by-ram.alg	(revision 1243650)
+++ modules/benchmark/conf/micro-standard-flush-by-ram.alg	(working copy)
@@ -53,7 +53,7 @@
     { "Populate"
         CreateIndex
         { "MAddDocs" AddDoc > : 2000
-        ForcMerge(1)
+        ForceMerge(1)
         CloseIndex
     }
 
Index: modules/benchmark/src/test/conf/ConfLoader.java
===================================================================
--- modules/benchmark/src/test/conf/ConfLoader.java	(revision 0)
+++ modules/benchmark/src/test/conf/ConfLoader.java	(working copy)
@@ -0,0 +1,22 @@
+package conf;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class ConfLoader {
+  // don't mind me, I load .alg files
+}

Property changes on: modules/benchmark/src/test/conf/ConfLoader.java
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
Index: modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksParse.java
===================================================================
--- modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksParse.java	(revision 1243650)
+++ modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksParse.java	(working copy)
@@ -17,14 +17,27 @@
 
 package org.apache.lucene.benchmark.byTask;
 
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileReader;
+import java.io.IOException;
 import java.io.StringReader;
 import java.util.ArrayList;
 
+import org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker;
+import org.apache.lucene.benchmark.byTask.feeds.ContentSource;
+import org.apache.lucene.benchmark.byTask.feeds.DocData;
+import org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException;
 import org.apache.lucene.benchmark.byTask.tasks.PerfTask;
 import org.apache.lucene.benchmark.byTask.tasks.TaskSequence;
 import org.apache.lucene.benchmark.byTask.utils.Algorithm;
+import org.apache.lucene.benchmark.byTask.utils.Config;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.LuceneTestCase;
 
+import conf.ConfLoader;
+
 /** Test very simply that perf tasks are parses as expected. */
 public class TestPerfTasksParse extends LuceneTestCase {
 
@@ -76,5 +89,57 @@
        assertTrue("Task "+taskStr+" was not found in "+alg.toString(),foundAdd);
     }
   }
+  
+  public static class MockContentSource extends ContentSource {
+    public DocData getNextDocData(DocData docData)
+        throws NoMoreDataException, IOException {
+      return docData;
+    }
+    public void close() throws IOException { }
+  }
 
+  public static class MockQueryMaker extends AbstractQueryMaker {
+    protected Query[] prepareQueries() throws Exception {
+      return new Query[0];
+    }
+  }
+  
+  /** Test the parsing of example scripts **/
+  public void testParseExamples() throws Exception {
+    // hackedy-hack-hack
+    boolean foundFiles = false;
+    final File examplesDir = new File(ConfLoader.class.getResource(".").toURI());
+    for (File algFile : examplesDir.listFiles(new FileFilter() {
+      public boolean accept(File pathname) { return pathname.isFile() && pathname.getName().endsWith(".alg"); }
+    })) {
+      try {
+        Config config = new Config(new FileReader(algFile));
+        String contentSource = config.get("content.source", null);
+        if (contentSource != null) { Class.forName(contentSource); }
+        config.set("work.dir", new File(TEMP_DIR,"work").getAbsolutePath());
+        config.set("content.source", MockContentSource.class.getName());
+        String dir = config.get("content.source", null);
+        if (dir != null) { Class.forName(dir); }
+        config.set("directory", RAMDirectory.class.getName());
+        if (config.get("line.file.out", null) != null) {
+          config.set("line.file.out", new File(TEMP_DIR,"o.txt").getAbsolutePath());
+        }
+        if (config.get("query.maker", null) != null) {
+          Class.forName(config.get("query.maker", null));
+          config.set("query.maker", MockQueryMaker.class.getName());
+        }
+        PerfRunData data = new PerfRunData(config);
+        new Algorithm(data);
+      } catch (Throwable t) {
+        t.printStackTrace();
+        fail("Could not parse sample file: " + algFile + " reason:"
+            + t.getClass() + ":" + t.getMessage());
+      }
+      foundFiles = true;
+    }
+    if (!foundFiles) {
+      fail("could not find any .alg files!");
+    }
+  }
+
 }
Index: modules/benchmark/build.xml
===================================================================
--- modules/benchmark/build.xml	(revision 1243650)
+++ modules/benchmark/build.xml	(working copy)
@@ -261,4 +261,11 @@
       <m2-deploy-with-pom-template pom.xml="lib/lucene-xercesImpl-pom.xml.template"
                                    jar.file="lib/xercesImpl-2.9.1-patched-XERCESJ-1257.jar" />
     </target>
+
+    <target name="compile-test" depends="contrib-build.compile-test">
+       <!-- copy .alg files as resources for testing -->
+       <copy todir="${build.dir}/classes/test/conf">
+         <fileset dir="conf"/>
+       </copy>
+    </target>
 </project>
Index: dev-tools/eclipse/dot.classpath
===================================================================
--- dev-tools/eclipse/dot.classpath	(revision 1243650)
+++ dev-tools/eclipse/dot.classpath	(working copy)
@@ -39,6 +39,7 @@
 	<classpathentry kind="src" path="modules/analysis/morfologik/src/test"/>
 	<classpathentry kind="src" path="modules/benchmark/src/java"/>
 	<classpathentry kind="src" path="modules/benchmark/src/test"/>
+        <classpathentry excluding="src" including="conf/**" kind="src" path="modules/benchmark"/>
 	<classpathentry kind="src" path="modules/facet/src/java"/>
 	<classpathentry kind="src" path="modules/facet/src/examples"/>
 	<classpathentry kind="src" path="modules/facet/src/test"/>
