Skip to content

Commit

Permalink
Merge pull request #126 from bolinfest/nicks/tests
Browse files Browse the repository at this point in the history
fix up the tests and add notes about extra files in third-party
  • Loading branch information
nicks authored Apr 14, 2017
2 parents 1f0b9e0 + 9770d92 commit f0d7614
Show file tree
Hide file tree
Showing 65 changed files with 34,256 additions and 8 deletions.
6 changes: 3 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"comment": [
"Because // was dropped from the JSON specification, this is the best way ",
"to comment a JSON config file while maintaining 80 column lines.",

"This config file is used to test the main() method of ConfigParser.java.",
"It assumes that each of the Closure Tools is checked out in a parallel ",
"directory. (This is not a requirement when using the full binary.)"
Expand All @@ -15,10 +15,10 @@
"closure-library": "../closure-library/closure/goog",
"paths": [
"testdata",
"../closure-templates/javascript/soyutils_usegoog.js"
"../third-party/javascript/soyutils_usegoog.js"
],
"inputs": "testdata/example/main.js",
"externs": "../closure-compiler/externs/",
"externs": "../third-party/externs/",

"options": {
"basic": {
Expand Down
2 changes: 1 addition & 1 deletion test/org/plovr/ConfigParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public String apply(JsInput input) {
"/closure/goog/soy/data.js",
"/closure/goog/soy/soy.js",
"/closure/goog/string/stringbuffer.js",
"../../closure/closure-templates/javascript/soyutils_usegoog.js",
"../../third-party/javascript/soyutils_usegoog.js",
"custom/foo/bar.soy",
"main/foo/bar.soy",
"main.js"),
Expand Down
4 changes: 2 additions & 2 deletions testdata/name-collision/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"paths": [
"main",
"custom",
"../../closure/closure-templates/javascript/soyutils_usegoog.js"
"../../third-party/javascript/soyutils_usegoog.js"
],
"inputs": "main.js",

// These options must be used because plovr is not being run from a jar where
// Closure resources are pre-packaged.
"closure-library": "../../closure/closure-library/closure/goog/",
"custom-externs-only": true,
"externs": "../../closure/closure-compiler/externs/"
"externs": "../../third-party/externs/"
}
22 changes: 20 additions & 2 deletions third-party/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Plovr Jar Dependencies
Plovr Dependencies
===========================

The BUCK build file in this directory is autogenerated from pom.xml.
Expand All @@ -10,4 +10,22 @@ Then update the maven version in the pom.xml. Then run:
mvn de.evosec:export-dependencies-maven-plugin:buck
```

Maven will resolve all the transitive dependencies and write the output to `target/BUCK`
Maven will resolve all the transitive dependencies and write the output to `target/BUCK`.
Manually inspect the file and copy it over the BUCK file in this dir.

Extra Steps for Closure Templates
---------------------------------

Closure Templates relies on a small JS support library [soyutils_usegoog.js](javascript/soyutils_usegoog.js).

You need to manually build this by checking out the Closure Templates repo, running `mvn install`, and
copying the computed file into this repo. I wish there was a better way to do this.

Extra Steps for Closure Compiler
--------------------------------

To test Closure Compiler's custom-externs-only option, we copy the externs from the Closure Compiler repo
into the [externs](externs) directory.

This is only used for testing. You only need to worry about this step if the tests don't pass and you're
getting weird errors about externs.
Loading

0 comments on commit f0d7614

Please sign in to comment.