└─┬ init-package-json@0.0.4
└── promzard@0.1.5
-It will show print out extraneous, missing, and invalid packages.
+It will print out extraneous, missing, and invalid packages.
+
+If a project specifies git urls for dependencies these are shown
+in parentheses after the name@version to make it easier for users to
+recognize potential forks of a project.
When run as `ll` or `la`, it shows extended information by default.
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
</div>
-<p id="footer">bin — npm@1.2.32</p>
+<p id="footer">bin — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">bugs — npm@1.2.32</p>
+<p id="footer">bugs — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">commands — npm@1.2.32</p>
+<p id="footer">commands — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">config — npm@1.2.32</p>
+<p id="footer">config — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate — npm@1.2.32</p>
+<p id="footer">deprecate — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This command will launch a browser, so this command may not be the most
friendly for programmatic use.</p>
</div>
-<p id="footer">docs — npm@1.2.32</p>
+<p id="footer">docs — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Since this command opens an editor in a new process, be careful about where
and how this is used.</p>
</div>
-<p id="footer">edit — npm@1.2.32</p>
+<p id="footer">edit — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p>
</div>
-<p id="footer">explore — npm@1.2.32</p>
+<p id="footer">explore — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
</div>
-<p id="footer">help-search — npm@1.2.32</p>
+<p id="footer">help-search — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p><a href="../doc/json.html">json(1)</a></p>
</div>
-<p id="footer">init — npm@1.2.32</p>
+<p id="footer">init — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
installed or when an error has been encountered.</p>
</div>
-<p id="footer">install — npm@1.2.32</p>
+<p id="footer">install — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Now, any changes to the redis package will be reflected in
the package in the current working directory</p>
</div>
-<p id="footer">link — npm@1.2.32</p>
+<p id="footer">link — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>For a list of all the available command-line configs, see <code>npm help config</code></p>
</div>
-<p id="footer">load — npm@1.2.32</p>
+<p id="footer">load — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.</p>
</div>
-<p id="footer">ls — npm@1.2.32</p>
+<p id="footer">ls — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.2.32</p>
+<p>1.3.2</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre>
</div>
-<p id="footer">npm — npm@1.2.32</p>
+<p id="footer">npm — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If the 'packages' parameter is left out, npm will check all packages.</p>
</div>
-<p id="footer">outdated — npm@1.2.32</p>
+<p id="footer">outdated — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">owner — npm@1.2.32</p>
+<p id="footer">owner — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no arguments are supplied, then npm packs the current package folder.</p>
</div>
-<p id="footer">pack — npm@1.2.32</p>
+<p id="footer">pack — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">prefix — npm@1.2.32</p>
+<p id="footer">prefix — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Extraneous packages are packages that are not listed on the parent
package's dependencies list.</p>
</div>
-<p id="footer">prune — npm@1.2.32</p>
+<p id="footer">prune — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul>
</div>
-<p id="footer">publish — npm@1.2.32</p>
+<p id="footer">publish — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>See <code>npm help build</code></p>
</div>
-<p id="footer">rebuild — npm@1.2.32</p>
+<p id="footer">rebuild — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">restart — npm@1.2.32</p>
+<p id="footer">restart — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically.</p>
</div>
-<p id="footer">root — npm@1.2.32</p>
+<p id="footer">root — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul>
</div>
-<p id="footer">run-script — npm@1.2.32</p>
+<p id="footer">run-script — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
and doesn't try to read your mind (it doesn't do any verb tense matching or the
like).</p>
</div>
-<p id="footer">search — npm@1.2.32</p>
+<p id="footer">search — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when the shrinkwrap has
been saved.</p>
</div>
-<p id="footer">shrinkwrap — npm@1.2.32</p>
+<p id="footer">shrinkwrap — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">start — npm@1.2.32</p>
+<p id="footer">start — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run stop on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">stop — npm@1.2.32</p>
+<p id="footer">stop — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li>npm help json</li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule — npm@1.2.32</p>
+<p id="footer">submodule — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
used. For more information about how to set this config, check
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
</div>
-<p id="footer">tag — npm@1.2.32</p>
+<p id="footer">tag — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
</div>
-<p id="footer">test — npm@1.2.32</p>
+<p id="footer">test — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>Finally, 'callback' is a function that will be called when all packages have been
uninstalled or when an error has been encountered.</p>
</div>
-<p id="footer">uninstall — npm@1.2.32</p>
+<p id="footer">uninstall — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.</p>
</div>
-<p id="footer">unpublish — npm@1.2.32</p>
+<p id="footer">unpublish — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p>
</div>
-<p id="footer">update — npm@1.2.32</p>
+<p id="footer">update — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
parameter. The difference, however, is this function will fail if it does
not have exactly one element. The only element should be a version number.</p>
</div>
-<p id="footer">version — npm@1.2.32</p>
+<p id="footer">version — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>corresponding to the list of fields selected.</p>
</div>
-<p id="footer">view — npm@1.2.32</p>
+<p id="footer">view — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p>This function is not useful programmatically</p>
</div>
-<p id="footer">whoami — npm@1.2.32</p>
+<p id="footer">whoami — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer"><a href="../doc/README.html">README</a> — npm@1.2.32</p>
+<p id="footer"><a href="../doc/README.html">README</a> — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul>
</div>
-<p id="footer">adduser — npm@1.2.32</p>
+<p id="footer">adduser — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">bin — npm@1.2.32</p>
+<p id="footer">bin — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">bugs — npm@1.2.32</p>
+<p id="footer">bugs — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">build — npm@1.2.32</p>
+<p id="footer">build — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">bundle — npm@1.2.32</p>
+<p id="footer">bundle — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul>
</div>
-<p id="footer">cache — npm@1.2.32</p>
+<p id="footer">cache — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul>
</div>
-<p id="footer">changelog — npm@1.2.32</p>
+<p id="footer">changelog — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">coding-style — npm@1.2.32</p>
+<p id="footer">coding-style — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">completion — npm@1.2.32</p>
+<p id="footer">completion — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul>
</div>
-<p id="footer">config — npm@1.2.32</p>
+<p id="footer">config — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/ls.html">ls(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">dedupe — npm@1.2.32</p>
+<p id="footer">dedupe — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">deprecate — npm@1.2.32</p>
+<p id="footer">deprecate — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul>
</div>
-<p id="footer">developers — npm@1.2.32</p>
+<p id="footer">developers — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">disputes — npm@1.2.32</p>
+<p id="footer">disputes — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">docs — npm@1.2.32</p>
+<p id="footer">docs — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">edit — npm@1.2.32</p>
+<p id="footer">edit — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">explore — npm@1.2.32</p>
+<p id="footer">explore — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">faq — npm@1.2.32</p>
+<p id="footer">faq — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
</div>
-<p id="footer">folders — npm@1.2.32</p>
+<p id="footer">folders — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul>
</div>
-<p id="footer">global — npm@1.2.32</p>
+<p id="footer">global — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul>
</div>
-<p id="footer">help-search — npm@1.2.32</p>
+<p id="footer">help-search — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul>
</div>
-<p id="footer">help — npm@1.2.32</p>
+<p id="footer">help — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<p> Display npm username</p>
</div>
-<p id="footer">index — npm@1.2.32</p>
+<p id="footer">index — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul>
</div>
-<p id="footer">init — npm@1.2.32</p>
+<p id="footer">init — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul>
</div>
-<p id="footer">install — npm@1.2.32</p>
+<p id="footer">install — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul>
</div>
-<p id="footer">json — npm@1.2.32</p>
+<p id="footer">json — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">link — npm@1.2.32</p>
+<p id="footer">link — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm's source tree will show:</p>
-<pre><code>npm@1.2.32 /path/to/npm
+<pre><code>npm@1.3.2 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5</code></pre>
-<p>It will show print out extraneous, missing, and invalid packages.</p>
+<p>It will print out extraneous, missing, and invalid packages.</p>
+
+<p>If a project specifies git urls for dependencies these are shown
+in parentheses after the name@version to make it easier for users to
+recognize potential forks of a project.</p>
<p>When run as <code>ll</code> or <code>la</code>, it shows extended information by default.</p>
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul>
</div>
-<p id="footer">ls — npm@1.2.32</p>
+<p id="footer">ls — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<h2 id="VERSION">VERSION</h2>
-<p>1.2.32</p>
+<p>1.3.2</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul>
</div>
-<p id="footer">npm — npm@1.2.32</p>
+<p id="footer">npm — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul>
</div>
-<p id="footer">outdated — npm@1.2.32</p>
+<p id="footer">outdated — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">owner — npm@1.2.32</p>
+<p id="footer">owner — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">pack — npm@1.2.32</p>
+<p id="footer">pack — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">prefix — npm@1.2.32</p>
+<p id="footer">prefix — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">prune — npm@1.2.32</p>
+<p id="footer">prune — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul>
</div>
-<p id="footer">publish — npm@1.2.32</p>
+<p id="footer">publish — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">rebuild — npm@1.2.32</p>
+<p id="footer">rebuild — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul>
</div>
-<p id="footer">registry — npm@1.2.32</p>
+<p id="footer">registry — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul>
</div>
-<p id="footer">removing-npm — npm@1.2.32</p>
+<p id="footer">removing-npm — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">restart — npm@1.2.32</p>
+<p id="footer">restart — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">rm — npm@1.2.32</p>
+<p id="footer">rm — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">root — npm@1.2.32</p>
+<p id="footer">root — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">run-script — npm@1.2.32</p>
+<p id="footer">run-script — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul>
</div>
-<p id="footer">scripts — npm@1.2.32</p>
+<p id="footer">scripts — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul>
</div>
-<p id="footer">search — npm@1.2.32</p>
+<p id="footer">search — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li></ul>
</div>
-<p id="footer">semver — npm@1.2.32</p>
+<p id="footer">semver — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">shrinkwrap — npm@1.2.32</p>
+<p id="footer">shrinkwrap — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">star — npm@1.2.32</p>
+<p id="footer">star — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/star.html">star(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">stars — npm@1.2.32</p>
+<p id="footer">stars — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">start — npm@1.2.32</p>
+<p id="footer">start — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul>
</div>
-<p id="footer">stop — npm@1.2.32</p>
+<p id="footer">stop — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul>
</div>
-<p id="footer">submodule — npm@1.2.32</p>
+<p id="footer">submodule — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">tag — npm@1.2.32</p>
+<p id="footer">tag — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul>
</div>
-<p id="footer">test — npm@1.2.32</p>
+<p id="footer">test — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul>
</div>
-<p id="footer">uninstall — npm@1.2.32</p>
+<p id="footer">uninstall — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul>
</div>
-<p id="footer">unpublish — npm@1.2.32</p>
+<p id="footer">unpublish — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul>
</div>
-<p id="footer">update — npm@1.2.32</p>
+<p id="footer">update — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul>
</div>
-<p id="footer">version — npm@1.2.32</p>
+<p id="footer">version — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul>
</div>
-<p id="footer">view — npm@1.2.32</p>
+<p id="footer">view — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
<ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul>
</div>
-<p id="footer">whoami — npm@1.2.32</p>
+<p id="footer">whoami — npm@1.3.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
npm.config.set("username", u.u, "user")
npm.config.set("_password", u.p, "user")
npm.config.set("email", u.e, "user")
+ npm.config.del("_token", "user")
log.info("adduser", "Authorized user %s", u.u)
npm.config.save("user", cb)
})
, zlib = require("zlib")
, chmodr = require("chmodr")
, which = require("which")
+ , isGitUrl = require("./utils/is-git-url.js")
cache.usage = "npm cache add <tarball file>"
+ "\nnpm cache add <folder>"
case "http:":
case "https:":
return addRemoteTarball(spec, null, name, cb)
- case "git:":
- case "git+http:":
- case "git+https:":
- case "git+rsync:":
- case "git+ftp:":
- case "git+ssh:":
- //p.protocol = p.protocol.replace(/^git([^:])/, "$1")
- return addRemoteGit(spec, p, name, false, cb)
+
default:
+ if (isGitUrl(p))
+ return addRemoteGit(spec, p, name, false, cb)
+
// if we have a name and a spec, then try name@spec
// if not, then try just spec (which may try name@"" if not found)
if (name) {
lock(k, function (er, fd) {
if (er) return cb(er)
- var fn = ( null !== semver.valid(x) ? addNameVersion
- : null !== semver.validRange(x) ? addNameRange
+ var fn = ( semver.valid(x, true) ? addNameVersion
+ : semver.validRange(x, true) ? addNameRange
: addNameTag
)
fn(name, x, data, cb)
var eng = data.versions[v].engines
if (!eng) return
if (!strict && !data.versions[v].engineStrict) return
- if (eng.node && !semver.satisfies(nodev, eng.node)
- || eng.npm && !semver.satisfies(npmv, eng.npm)) {
+ if (eng.node && !semver.satisfies(nodev, eng.node, true)
+ || eng.npm && !semver.satisfies(npmv, eng.npm, true)) {
delete data.versions[v]
}
})
function addNameRange (name, range, data, cb) {
if (typeof cb !== "function") cb = data, data = null
- range = semver.validRange(range)
+ range = semver.validRange(range, true)
if (range === null) return cb(new Error(
"Invalid version range: "+range))
// if the tagged version satisfies, then use that.
var tagged = data["dist-tags"][npm.config.get("tag")]
- if (tagged && data.versions[tagged] && semver.satisfies(tagged, range)) {
+ if (tagged
+ && data.versions[tagged]
+ && semver.satisfies(tagged, range, true)) {
return addNamed(name, tagged, data.versions[tagged], cb)
}
// find the max satisfying version.
- var ms = semver.maxSatisfying(Object.keys(data.versions || {}), range)
+ var versions = Object.keys(data.versions || {})
+ var ms = semver.maxSatisfying(versions, range, true)
if (!ms) {
return cb(installTargetsError(range, data))
}
+ requested + "\n" + targets)
}
-function addNameVersion (name, ver, data, cb) {
+function addNameVersion (name, v, data, cb) {
if (typeof cb !== "function") cb = data, data = null
- ver = semver.valid(ver)
- if (ver === null) return cb(new Error("Invalid version: "+ver))
+ ver = semver.valid(v, true)
+ if (!ver) return cb(new Error("Invalid version: "+v))
var response
// tar it to the proper place, and add the cache tar
if (p.indexOf(npm.cache) === 0) return cb(new Error(
"Adding a cache directory to the cache will make the world implode."))
- readJson(path.join(p, "package.json"), function (er, data) {
+ var strict = p.indexOf(npm.tmp) !== 0
+ && p.indexOf(npm.cache) !== 0
+ readJson(path.join(p, "package.json"), strict, function (er, data) {
er = needName(er, data)
er = needVersion(er, data)
if (er) return cb(er)
, data.version, "package.tgz" )
, placeDirect = path.basename(p) === "package"
, tgz = placeDirect ? placed : tmptgz
- , doFancyCrap = p.indexOf(npm.tmp) !== 0
- && p.indexOf(npm.cache) !== 0
getCacheStat(function (er, cs) {
mkdir(path.dirname(tgz), function (er, made) {
if (er) return cb(er)
- tar.pack(tgz, p, data, doFancyCrap, function (er) {
+ tar.pack(tgz, p, data, strict, function (er) {
if (er) {
log.error( "addLocalDirectory", "Could not pack %j to %j"
, p, tgz )
function bestMatch (versions, ranges) {
return versions.filter(function (v) {
return !ranges.some(function (r) {
- return !semver.satisfies(v, r)
+ return !semver.satisfies(v, r, true)
})
- }).sort(semver.compare).pop()
+ }).sort(semver.compareLoose).pop()
}
if (er) return cb(er)
// filter all the versions that match
Object.keys(data.versions).filter(function (v) {
- return semver.satisfies(v, ver)
+ return semver.satisfies(v, ver, true)
}).forEach(function (v) {
data.versions[v].deprecated = msg
})
, archy = require("archy")
function install (args, cb_) {
+ var hasArguments = !!args.length
function cb (er, installed) {
if (er) return cb_(er)
, pretty = prettify(tree, installed).trim()
if (pretty) console.log(pretty)
- save(where, installed, tree, pretty, cb_)
+ save(where, installed, tree, pretty, hasArguments, cb_)
})
}
// initial "family" is the name:version of the root, if it's got
// a package.json file.
- readJson(path.resolve(where, "package.json"), function (er, data) {
- if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
+ var jsonFile = path.resolve(where, "package.json")
+ readJson(jsonFile, true, function (er, data) {
+ if (er
+ && er.code !== "ENOENT"
+ && er.code !== "ENOTDIR") return cb(er)
if (er) data = null
var context = { family: {}
, ancestors: {}
}
function findPeerInvalid (where, cb) {
- readInstalled(where, function (er, data) {
+ readInstalled(where, log.warn, function (er, data) {
if (er) return cb(er)
cb(null, findPeerInvalid_(data.dependencies, []))
// if the -S|--save option is specified, then write installed packages
// as dependencies to a package.json file.
// This is experimental.
-function save (where, installed, tree, pretty, cb) {
- if (!npm.config.get("save") &&
+function save (where, installed, tree, pretty, hasArguments, cb) {
+ if (!hasArguments ||
+ !npm.config.get("save") &&
!npm.config.get("save-dev") &&
!npm.config.get("save-optional") ||
npm.config.get("global")) {
if (u && u.protocol) w[1] = t.from
return w
}).reduce(function (set, k) {
- var rangeDescriptor = semver.valid(k[1]) &&
- semver.gte(k[1], "0.1.0")
+ var rangeDescriptor = semver.valid(k[1], true) &&
+ semver.gte(k[1], "0.1.0", true)
? "~" : ""
set[k[0]] = rangeDescriptor + k[1]
return set
if (context.explicit) return next()
- readJson(path.join(where, "package.json"), function (er, data) {
+ readJson(path.join(where, "package.json"), true, function (er, data) {
if (er) return next(er)
lifecycle(data, "preinstall", where, next)
})
// otherwise, make sure that it's a semver match with what we want.
var bd = parent.bundleDependencies
if (bd && bd.indexOf(d.name) !== -1 ||
- semver.satisfies(d.version, deps[d.name] || "*")) {
+ semver.satisfies(d.version, deps[d.name] || "*", true)) {
return cb(null, d.name)
}
// prefer to not install things that are satisfied by
// something in the "family" list, unless we're installing
// from a shrinkwrap.
- return wrap || !semver.satisfies(family[d], packageData[depsKey][d])
+ if (wrap) return wrap
+ if (semver.validRange(family[d], true))
+ return !semver.satisfies(family[d], packageData[depsKey][d], true)
+ return true
}).map(function (d) {
var t = packageData[depsKey][d]
, parsed = url.parse(t.replace(/^git\+/, "git"))
, path = require("path")
, archy = require("archy")
, semver = require("semver")
+ , url = require("url")
+ , isGitUrl = require("./utils/is-git-url.js")
ls.usage = "npm ls"
return [ name, ver ]
})
- readInstalled(dir, npm.config.get("depth"), function (er, data) {
+ var depth = npm.config.get("depth")
+ readInstalled(dir, depth, log.warn, function (er, data) {
var bfs = bfsify(data, args)
, lite = getLite(bfs)
function getLite (data, noname) {
var lite = {}
, maxDepth = npm.config.get("depth")
- , url = require("url")
if (!noname && data.name) lite.name = data.name
if (data.version) lite.version = data.version
var found = false
for (var i = 0; !found && i < args.length; i ++) {
if (d === args[i][0]) {
- found = semver.satisfies(dep.version, args[i][1])
+ found = semver.satisfies(dep.version, args[i][1], true)
}
}
// included explicitly
+ (color ? "\033[0m" : "")
}
+ // add giturl to name@version
+ if (data._resolved) {
+ var p = url.parse(data._resolved)
+ if (isGitUrl(p))
+ out.label += " (" + data._resolved + ")"
+ }
+
if (long) {
if (dir === data.path) out.label += "\n" + dir
out.label += "\n" + getExtras(data, dir)
function getExtras (data, dir) {
var extras = []
- , url = require("url")
if (data.description) extras.push(data.description)
if (data.repository) extras.push(data.repository.url)
+ ":"+d+"@"+JSON.stringify(data)+":INVALID:MISSING"
: ""
} else {
- data = path.resolve(data.path, "node_modules", d)
+ data = path.resolve(data.path || "", "node_modules", d || "")
+ (npm.config.get("long")
? ":" + d + "@" + JSON.stringify(data)
+ ":" // no realpath resolved
npm.commands = {}
try {
+ var pv = process.version.replace(/^v/, '')
// startup, ok to do this synchronously
var j = JSON.parse(fs.readFileSync(
path.join(__dirname, "../package.json"))+"")
npm.version = j.version
npm.nodeVersionRequired = j.engines.node
- if (!semver.satisfies(process.version, j.engines.node)) {
+ if (!semver.satisfies(pv, j.engines.node)) {
log.warn("unsupported version", [""
,"npm requires node version: "+j.engines.node
- ,"And you have: "+process.version
+ ,"And you have: "+pv
,"which is not satisfactory."
,""
,"Bad things will likely happen. You have been warned."
, cache = require("./cache.js")
, asyncMap = require("slide").asyncMap
, npm = require("./npm.js")
- , semver = require("semver")
function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
log.warn("publish", "Forced publish over "+data._id)
return npm.commands.unpublish([data._id], function (er) {
// ignore errors. Use the force. Reach out with your feelings.
- publish([arg], true, cb)
+ // but if it fails again, then report the first error.
+ publish([arg], er || true, cb)
})
}
+ // report the unpublish error if this was a retry and unpublish failed
+ if (er && isRetry && isRetry !== true) return cb(isRetry)
if (er) return cb(er)
console.log("+ " + data._id)
cb()
, n = nv.shift()
, v = nv.join("@")
if (n !== data.name) continue
- if (!semver.satisfies(data.version, v)) continue
+ if (!semver.satisfies(data.version, v, true)) continue
pass = true
break
}
var npm = require("./npm.js")
, registry = npm.registry
- , semver = require("semver")
search.usage = "npm search [some search terms ...]"
var getSubmodules = function getSubmodules (cb) {
var git = npm.config.get("git")
- var arg = [ "submodule", "status" ]
+ var args = [ "submodule", "status" ]
// check for git
which(git, function (err) {
readJson.cache.del(path.resolve(folder, "package.json"))
- log.verbose([top, gnm, parent], "unbuild "+pkg._id)
+ log.verbose([top, gnm, parent], "unbuild " + pkg._id)
+ console.log("unbuild " + pkg._id)
asyncMap([rmBins, rmMans], function (fn, cb) {
fn(pkg, folder, parent, top, cb)
}, cb)
, readJson = require("read-package-json")
, path = require("path")
, npm = require("./npm.js")
- , semver = require("semver")
, asyncMap = require("slide").asyncMap
function uninstall (args, cb) {
--- /dev/null
+module.exports = isGitUrl
+
+function isGitUrl (url) {
+ switch (url.protocol) {
+ case "git:":
+ case "git+http:":
+ case "git+https:":
+ case "git+rsync:":
+ case "git+ftp:":
+ case "git+ssh:":
+ return true
+ }
+}
, which = require("which")
, npm = require("./npm.js")
-version.usage = "npm version [<newversion> | major | minor | patch | build]\n"
+version.usage = "npm version [<newversion> | major | minor | patch]\n"
+ "\n(run in package dir)\n"
+ "'npm -v' or 'npm --version' to print npm version "
+ "("+npm.version+")\n"
if (er) return cb(er)
var dv = d.versions[d["dist-tags"][tag]]
, fields = []
- d.versions = Object.keys(d.versions).sort(semver.compare)
+ d.versions = Object.keys(d.versions).sort(semver.compareLoose)
fields = getFields(d).concat(getFields(dv))
cb(null, fields)
})
var results = []
, error = null
, versions = data.versions
- data.versions = Object.keys(data.versions).sort(semver.compare)
+ data.versions = Object.keys(data.versions).sort(semver.compareLoose)
if (!args.length) args = [""]
// remove readme unless we asked for it
}
Object.keys(versions).forEach(function (v) {
- if (semver.satisfies(v, version)) args.forEach(function (args) {
+ if (semver.satisfies(v, version, true)) args.forEach(function (args) {
// remove readme unless we asked for it
if (-1 === args.indexOf("readme")) {
delete versions[v].readme
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "June 2013" "" ""
+.TH "NPM" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ADDUSER" "1" "June 2013" "" ""
+.TH "NPM\-ADDUSER" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-adduser\fR \-\- Add a registry user account
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "1" "June 2013" "" ""
+.TH "NPM\-BIN" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "1" "June 2013" "" ""
+.TH "NPM\-BUGS" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUILD" "1" "June 2013" "" ""
+.TH "NPM\-BUILD" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-build\fR \-\- Build a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUNDLE" "1" "June 2013" "" ""
+.TH "NPM\-BUNDLE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-bundle\fR \-\- REMOVED
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CACHE" "1" "June 2013" "" ""
+.TH "NPM\-CACHE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-cache\fR \-\- Manipulates packages cache
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CHANGELOG" "1" "June 2013" "" ""
+.TH "NPM\-CHANGELOG" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-changelog\fR \-\- Changes
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CODING\-STYLE" "1" "June 2013" "" ""
+.TH "NPM\-CODING\-STYLE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-coding-style\fR \-\- npm\'s "funny" coding style
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMPLETION" "1" "June 2013" "" ""
+.TH "NPM\-COMPLETION" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-completion\fR \-\- Tab Completion for npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "1" "June 2013" "" ""
+.TH "NPM\-CONFIG" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEDUPE" "1" "June 2013" "" ""
+.TH "NPM\-DEDUPE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-dedupe\fR \-\- Reduce duplication
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "1" "June 2013" "" ""
+.TH "NPM\-DEPRECATE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEVELOPERS" "1" "June 2013" "" ""
+.TH "NPM\-DEVELOPERS" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-developers\fR \-\- Developer Guide
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DISPUTES" "1" "June 2013" "" ""
+.TH "NPM\-DISPUTES" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-disputes\fR \-\- Handling Module Name Disputes
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "1" "June 2013" "" ""
+.TH "NPM\-DOCS" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "1" "June 2013" "" ""
+.TH "NPM\-EDIT" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "1" "June 2013" "" ""
+.TH "NPM\-EXPLORE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FAQ" "1" "June 2013" "" ""
+.TH "NPM\-FAQ" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-faq\fR \-\- Frequently Asked Questions
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FOLDERS" "1" "June 2013" "" ""
+.TH "NPM\-FOLDERS" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-FOLDERS" "1" "June 2013" "" ""
+.TH "NPM\-FOLDERS" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-folders\fR \-\- Folder Structures Used by npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "1" "June 2013" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search npm help documentation
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP" "1" "June 2013" "" ""
+.TH "NPM\-HELP" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-help\fR \-\- Get help on npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INDEX" "1" "June 2013" "" ""
+.TH "NPM\-INDEX" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-index\fR \-\- Index of all npm documentation
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INIT" "1" "June 2013" "" ""
+.TH "NPM\-INIT" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-init\fR \-\- Interactively create a package\.json file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "1" "June 2013" "" ""
+.TH "NPM\-INSTALL" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- Install a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-JSON" "1" "June 2013" "" ""
+.TH "NPM\-JSON" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-json\fR \-\- Specifics of npm\'s package\.json handling
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "1" "June 2013" "" ""
+.TH "NPM\-LINK" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "1" "June 2013" "" ""
+.TH "NPM\-LS" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.IP "" 4
.
.nf
-npm@1.2.32 /path/to/npm
+npm@1.3.2 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.
.IP "" 0
.
.P
-It will show print out extraneous, missing, and invalid packages\.
+It will print out extraneous, missing, and invalid packages\.
+.
+.P
+If a project specifies git urls for dependencies these are shown
+in parentheses after the name@version to make it easier for users to
+recognize potential forks of a project\.
.
.P
When run as \fBll\fR or \fBla\fR, it shows extended information by default\.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "1" "June 2013" "" ""
+.TH "NPM" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.2.32
+1.3.2
.
.SH "DESCRIPTION"
npm is the package manager for the Node JavaScript platform\. It puts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "1" "June 2013" "" ""
+.TH "NPM\-OUTDATED" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "1" "June 2013" "" ""
+.TH "NPM\-OWNER" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "1" "June 2013" "" ""
+.TH "NPM\-PACK" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "1" "June 2013" "" ""
+.TH "NPM\-PREFIX" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "1" "June 2013" "" ""
+.TH "NPM\-PRUNE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "1" "June 2013" "" ""
+.TH "NPM\-PUBLISH" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "1" "June 2013" "" ""
+.TH "NPM\-REBUILD" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REGISTRY" "1" "June 2013" "" ""
+.TH "NPM\-REGISTRY" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-registry\fR \-\- The JavaScript Package Registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REMOVAL" "1" "June 2013" "" ""
+.TH "NPM\-REMOVAL" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-removal\fR \-\- Cleaning the Slate
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "1" "June 2013" "" ""
+.TH "NPM\-RESTART" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RM" "1" "June 2013" "" ""
+.TH "NPM\-RM" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "1" "June 2013" "" ""
+.TH "NPM\-ROOT" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "1" "June 2013" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SCRIPTS" "1" "June 2013" "" ""
+.TH "NPM\-SCRIPTS" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-scripts\fR \-\- How npm handles the "scripts" field
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "1" "June 2013" "" ""
+.TH "NPM\-SEARCH" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEMVER" "1" "June 2013" "" ""
+.TH "NPM\-SEMVER" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-semver\fR \-\- The semantic versioner for npm
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SHRINKWRAP" "1" "June 2013" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-shrinkwrap\fR \-\- Lock down dependency versions
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STAR" "1" "June 2013" "" ""
+.TH "NPM\-STAR" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-star\fR \-\- Mark your favorite packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STARS" "1" "June 2013" "" ""
+.TH "NPM\-STARS" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-stars\fR \-\- View packages marked as favorites
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "1" "June 2013" "" ""
+.TH "NPM\-START" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "1" "June 2013" "" ""
+.TH "NPM\-STOP" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "1" "June 2013" "" ""
+.TH "NPM\-SUBMODULE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "1" "June 2013" "" ""
+.TH "NPM\-TAG" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "1" "June 2013" "" ""
+.TH "NPM\-TEST" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RM" "1" "June 2013" "" ""
+.TH "NPM\-RM" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-rm\fR \-\- Remove a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "1" "June 2013" "" ""
+.TH "NPM\-UNPUBLISH" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "1" "June 2013" "" ""
+.TH "NPM\-UPDATE" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "1" "June 2013" "" ""
+.TH "NPM\-VERSION" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "1" "June 2013" "" ""
+.TH "NPM\-VIEW" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "1" "June 2013" "" ""
+.TH "NPM\-WHOAMI" "1" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BIN" "3" "June 2013" "" ""
+.TH "NPM\-BIN" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-bin\fR \-\- Display npm bin folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-BUGS" "3" "June 2013" "" ""
+.TH "NPM\-BUGS" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-COMMANDS" "3" "June 2013" "" ""
+.TH "NPM\-COMMANDS" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-commands\fR \-\- npm commands
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-CONFIG" "3" "June 2013" "" ""
+.TH "NPM\-CONFIG" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-config\fR \-\- Manage the npm configuration files
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DEPRECATE" "3" "June 2013" "" ""
+.TH "NPM\-DEPRECATE" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-deprecate\fR \-\- Deprecate a version of a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-DOCS" "3" "June 2013" "" ""
+.TH "NPM\-DOCS" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-docs\fR \-\- Docs for a package in a web browser maybe
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EDIT" "3" "June 2013" "" ""
+.TH "NPM\-EDIT" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-edit\fR \-\- Edit an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-EXPLORE" "3" "June 2013" "" ""
+.TH "NPM\-EXPLORE" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-explore\fR \-\- Browse an installed package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-HELP\-SEARCH" "3" "June 2013" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-help-search\fR \-\- Search the help pages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "INIT" "3" "June 2013" "" ""
+.TH "INIT" "3" "July 2013" "" ""
.
.SH "NAME"
\fBinit\fR \-\- Interactively create a package\.json file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-INSTALL" "3" "June 2013" "" ""
+.TH "NPM\-INSTALL" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-install\fR \-\- install a package programmatically
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LINK" "3" "June 2013" "" ""
+.TH "NPM\-LINK" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-link\fR \-\- Symlink a package folder
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LOAD" "3" "June 2013" "" ""
+.TH "NPM\-LOAD" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-load\fR \-\- Load config settings
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-LS" "3" "June 2013" "" ""
+.TH "NPM\-LS" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-ls\fR \-\- List installed packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM" "3" "June 2013" "" ""
+.TH "NPM" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm\fR \-\- node package manager
.fi
.
.SH "VERSION"
-1.2.32
+1.3.2
.
.SH "DESCRIPTION"
This is the API documentation for npm\.
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OUTDATED" "3" "June 2013" "" ""
+.TH "NPM\-OUTDATED" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-outdated\fR \-\- Check for outdated packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-OWNER" "3" "June 2013" "" ""
+.TH "NPM\-OWNER" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-owner\fR \-\- Manage package owners
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PACK" "3" "June 2013" "" ""
+.TH "NPM\-PACK" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-pack\fR \-\- Create a tarball from a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PREFIX" "3" "June 2013" "" ""
+.TH "NPM\-PREFIX" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-prefix\fR \-\- Display prefix
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PRUNE" "3" "June 2013" "" ""
+.TH "NPM\-PRUNE" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-prune\fR \-\- Remove extraneous packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-PUBLISH" "3" "June 2013" "" ""
+.TH "NPM\-PUBLISH" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-publish\fR \-\- Publish a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-REBUILD" "3" "June 2013" "" ""
+.TH "NPM\-REBUILD" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-rebuild\fR \-\- Rebuild a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RESTART" "3" "June 2013" "" ""
+.TH "NPM\-RESTART" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-restart\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-ROOT" "3" "June 2013" "" ""
+.TH "NPM\-ROOT" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-root\fR \-\- Display npm root
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-RUN\-SCRIPT" "3" "June 2013" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-run-script\fR \-\- Run arbitrary package scripts
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SEARCH" "3" "June 2013" "" ""
+.TH "NPM\-SEARCH" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-search\fR \-\- Search for packages
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SHRINKWRAP" "3" "June 2013" "" ""
+.TH "NPM\-SHRINKWRAP" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-shrinkwrap\fR \-\- programmatically generate package shrinkwrap file
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-START" "3" "June 2013" "" ""
+.TH "NPM\-START" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-start\fR \-\- Start a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-STOP" "3" "June 2013" "" ""
+.TH "NPM\-STOP" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-stop\fR \-\- Stop a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-SUBMODULE" "3" "June 2013" "" ""
+.TH "NPM\-SUBMODULE" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-submodule\fR \-\- Add a package as a git submodule
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TAG" "3" "June 2013" "" ""
+.TH "NPM\-TAG" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-tag\fR \-\- Tag a published version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-TEST" "3" "June 2013" "" ""
+.TH "NPM\-TEST" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-test\fR \-\- Test a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNINSTALL" "3" "June 2013" "" ""
+.TH "NPM\-UNINSTALL" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-uninstall\fR \-\- uninstall a package programmatically
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UNPUBLISH" "3" "June 2013" "" ""
+.TH "NPM\-UNPUBLISH" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-unpublish\fR \-\- Remove a package from the registry
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-UPDATE" "3" "June 2013" "" ""
+.TH "NPM\-UPDATE" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-update\fR \-\- Update a package
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VERSION" "3" "June 2013" "" ""
+.TH "NPM\-VERSION" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-version\fR \-\- Bump a package version
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-VIEW" "3" "June 2013" "" ""
+.TH "NPM\-VIEW" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-view\fR \-\- View registry info
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
-.TH "NPM\-WHOAMI" "3" "June 2013" "" ""
+.TH "NPM\-WHOAMI" "3" "July 2013" "" ""
.
.SH "NAME"
\fBnpm-whoami\fR \-\- Display npm username
{
"name": "init-package-json",
- "version": "0.0.9",
+ "version": "0.0.10",
"main": "init-package-json.js",
"scripts": {
"test": "tap test/*.js"
"dependencies": {
"promzard": "~0.2.0",
"read": "~1.0.1",
- "read-package-json": "0",
- "semver": "1.x"
+ "read-package-json": "1",
+ "semver": "2.x"
},
"devDependencies": {
"tap": "~0.2.5",
"bugs": {
"url": "https://github.com/isaacs/init-package-json/issues"
},
- "_id": "init-package-json@0.0.9",
+ "_id": "init-package-json@0.0.10",
"_from": "init-package-json@latest"
}
{
"asi": true,
"laxcomma": true,
+ "es5": true,
"node": true,
"strict": false
}
-legacy/tools/gyp/test/
+gyp/test
still has a `wscript` file, then you should definitely add a `binding.gyp` file
to support the latest versions of node.
-Multiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,
+Multiple target versions of node are supported (i.e. `0.8`, `0.9`, `0.10`, ..., `1.0`,
etc.), regardless of what version of node is actually installed on your system
(`node-gyp` downloads the necessary development files for the target version).
import os.path
import re
import shlex
+import subprocess
+import sys
+from gyp.common import GypError
class XcodeSettings(object):
"""A class that understands the gyp 'xcode_settings' object."""
- # Computed lazily by _GetSdkBaseDir(). Shared by all XcodeSettings, so cached
+ # Populated lazily by _SdkPath(). Shared by all XcodeSettings, so cached
# at class-level for efficiency.
- _sdk_base_dir = None
+ _sdk_path_cache = {}
def __init__(self, spec):
self.spec = spec
else:
return self._GetStandaloneBinaryPath()
- def _GetSdkBaseDir(self):
- """Returns the root of the 'Developer' directory. On Xcode 4.2 and prior,
- this is usually just /Developer. Xcode 4.3 moved that folder into the Xcode
- bundle."""
- if not XcodeSettings._sdk_base_dir:
- import subprocess
- job = subprocess.Popen(['xcode-select', '-print-path'],
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- out, err = job.communicate()
- if job.returncode != 0:
- print out
- raise Exception('Error %d running xcode-select' % job.returncode)
- # The Developer folder moved in Xcode 4.3.
- xcode43_sdk_path = os.path.join(
- out.rstrip(), 'Platforms/MacOSX.platform/Developer/SDKs')
- if os.path.isdir(xcode43_sdk_path):
- XcodeSettings._sdk_base_dir = xcode43_sdk_path
- else:
- XcodeSettings._sdk_base_dir = os.path.join(out.rstrip(), 'SDKs')
- return XcodeSettings._sdk_base_dir
+ def _GetSdkVersionInfoItem(self, sdk, infoitem):
+ job = subprocess.Popen(['xcodebuild', '-version', '-sdk', sdk, infoitem],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ out = job.communicate()[0]
+ if job.returncode != 0:
+ sys.stderr.write(out + '\n')
+ raise GypError('Error %d running xcodebuild' % job.returncode)
+ return out.rstrip('\n')
def _SdkPath(self):
- sdk_root = self.GetPerTargetSetting('SDKROOT', default='macosx10.5')
- if sdk_root.startswith('macosx'):
- return os.path.join(self._GetSdkBaseDir(),
- 'MacOSX' + sdk_root[len('macosx'):] + '.sdk')
- return sdk_root
+ sdk_root = self.GetPerTargetSetting('SDKROOT', default='macosx')
+ if sdk_root not in XcodeSettings._sdk_path_cache:
+ XcodeSettings._sdk_path_cache[sdk_root] = self._GetSdkVersionInfoItem(
+ sdk_root, 'Path')
+ return XcodeSettings._sdk_path_cache[sdk_root]
+
+ def _AppendPlatformVersionMinFlags(self, lst):
+ self._Appendf(lst, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s')
+ if 'IPHONEOS_DEPLOYMENT_TARGET' in self._Settings():
+ # TODO: Implement this better?
+ sdk_path_basename = os.path.basename(self._SdkPath())
+ if sdk_path_basename.lower().startswith('iphonesimulator'):
+ self._Appendf(lst, 'IPHONEOS_DEPLOYMENT_TARGET',
+ '-mios-simulator-version-min=%s')
+ else:
+ self._Appendf(lst, 'IPHONEOS_DEPLOYMENT_TARGET',
+ '-miphoneos-version-min=%s')
def GetCflags(self, configname):
"""Returns flags that need to be added to .c, .cc, .m, and .mm
if 'SDKROOT' in self._Settings():
cflags.append('-isysroot %s' % sdk_root)
+ if self._Test('CLANG_WARN_CONSTANT_CONVERSION', 'YES', default='NO'):
+ cflags.append('-Wconstant-conversion')
+
if self._Test('GCC_CHAR_IS_UNSIGNED_CHAR', 'YES', default='NO'):
cflags.append('-funsigned-char')
if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'):
cflags.append('-Wnewline-eof')
- self._Appendf(cflags, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s')
+ self._AppendPlatformVersionMinFlags(cflags)
# TODO:
if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'):
"""Returns flags that need to be added to .cc, and .mm compilations."""
self.configname = configname
cflags_cc = []
+
+ clang_cxx_language_standard = self._Settings().get(
+ 'CLANG_CXX_LANGUAGE_STANDARD')
+ if clang_cxx_language_standard == 'c++0x':
+ cflags_cc.append('-std=c++11')
+ elif clang_cxx_language_standard == 'gnu++0x':
+ cflags_cc.append('-std=gnu++11')
+ elif clang_cxx_language_standard:
+ cflags_cc.append('-std=%s' % clang_cxx_language_standard)
+
+ self._Appendf(cflags_cc, 'CLANG_CXX_LIBRARY', '-stdlib=%s')
+
if self._Test('GCC_ENABLE_CPP_RTTI', 'NO', default='YES'):
cflags_cc.append('-fno-rtti')
if self._Test('GCC_ENABLE_CPP_EXCEPTIONS', 'NO', default='YES'):
ldflags, 'DYLIB_COMPATIBILITY_VERSION', '-compatibility_version %s')
self._Appendf(
ldflags, 'DYLIB_CURRENT_VERSION', '-current_version %s')
- self._Appendf(
- ldflags, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s')
+
+ self._AppendPlatformVersionMinFlags(ldflags)
+
if 'SDKROOT' in self._Settings():
ldflags.append('-isysroot ' + self._SdkPath())
order.reverse()
return order
except gyp.common.CycleError, e:
- raise Exception(
+ raise GypError(
'Xcode environment variables are cyclically dependent: ' + str(e.nodes))
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies actions which are not depended on by other targets get executed.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('bare.gyp', chdir='src')
-test.relocate('src', 'relocate/src')
-test.build('bare.gyp', chdir='relocate/src')
-
-file_content = 'Hello from bare.py\n'
-
-test.built_file_must_match('out.txt', file_content, chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'bare',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'action1',
- 'inputs': [
- 'bare.py',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/out.txt',
- ],
- 'action': ['python', 'bare.py', '<(PRODUCT_DIR)/out.txt'],
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-f = open(sys.argv[1], 'wb')
-f.write('Hello from bare.py\n')
-f.close()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies two actions can be attached to the same input files.
-"""
-
-import sys
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('actions.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-# Test of fine-grained dependencies for generators that can build individual
-# files on demand.
-# In particular:
-# - TargetA depends on TargetB.
-# - TargetA and TargetB are 'none' type with actions attached.
-# - TargetA has multiple actions.
-# - An output from one of the actions in TargetA (not the first listed),
-# is requested as the build target.
-# Ensure that TargetB gets built.
-#
-# This sub-test can only be done with generators/build tools that can
-# be asked to build individual files rather than whole targets (make, ninja).
-if test.format in ['make', 'ninja']:
- # Select location of target based on generator.
- if test.format == 'make':
- target = 'multi2.txt'
- elif test.format == 'ninja':
- if sys.platform in ['win32', 'cygwin']:
- target = '..\\..\\multi2.txt'
- else:
- target = '../../multi2.txt'
- else:
- assert False
- test.build('actions.gyp', chdir='relocate/src', target=target)
- test.must_contain('relocate/src/multi2.txt', 'hello there')
- test.must_contain('relocate/src/multi_dep.txt', 'hello there')
-
-
-# Test that two actions can be attached to the same inputs.
-test.build('actions.gyp', test.ALL, chdir='relocate/src')
-test.must_contain('relocate/src/output1.txt', 'hello there')
-test.must_contain('relocate/src/output2.txt', 'hello there')
-test.must_contain('relocate/src/output3.txt', 'hello there')
-test.must_contain('relocate/src/output4.txt', 'hello there')
-
-# Test that process_outputs_as_sources works in conjuction with merged
-# actions.
-test.run_built_executable(
- 'multiple_action_source_filter',
- chdir='relocate/src',
- stdout=(
- '{\n'
- 'bar\n'
- 'car\n'
- 'dar\n'
- 'ear\n'
- '}\n'
- ),
-)
-
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- # Have a long string so that actions will exceed xp 512 character
- # command limit on xp.
- 'long_string':
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- 'abcdefghijklmnopqrstuvwxyz0123456789'
- },
- 'targets': [
- {
- 'target_name': 'multiple_action_target',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'action1',
- 'inputs': [
- 'copy.py',
- 'input.txt',
- ],
- 'outputs': [
- 'output1.txt',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<(_outputs)', '<(long_string)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'action2',
- 'inputs': [
- 'copy.py',
- 'input.txt',
- ],
- 'outputs': [
- 'output2.txt',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<(_outputs)', '<(long_string)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'action3',
- 'inputs': [
- 'copy.py',
- 'input.txt',
- ],
- 'outputs': [
- 'output3.txt',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<(_outputs)', '<(long_string)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'action4',
- 'inputs': [
- 'copy.py',
- 'input.txt',
- ],
- 'outputs': [
- 'output4.txt',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<(_outputs)', '<(long_string)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'multiple_action_source_filter',
- 'type': 'executable',
- 'sources': [
- 'main.c',
- # TODO(bradnelson): add foo.c here once this issue is fixed:
- # http://code.google.com/p/gyp/issues/detail?id=175
- ],
- 'actions': [
- {
- 'action_name': 'action1',
- 'inputs': [
- 'foo.c',
- 'filter.py',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/output1.c',
- ],
- 'process_outputs_as_sources': 1,
- 'action': [
- 'python', 'filter.py', 'foo', 'bar', 'foo.c', '<@(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'action2',
- 'inputs': [
- 'foo.c',
- 'filter.py',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/output2.c',
- ],
- 'process_outputs_as_sources': 1,
- 'action': [
- 'python', 'filter.py', 'foo', 'car', 'foo.c', '<@(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'action3',
- 'inputs': [
- 'foo.c',
- 'filter.py',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/output3.c',
- ],
- 'process_outputs_as_sources': 1,
- 'action': [
- 'python', 'filter.py', 'foo', 'dar', 'foo.c', '<@(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'action4',
- 'inputs': [
- 'foo.c',
- 'filter.py',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/output4.c',
- ],
- 'process_outputs_as_sources': 1,
- 'action': [
- 'python', 'filter.py', 'foo', 'ear', 'foo.c', '<@(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'multiple_dependent_target',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'action1',
- 'inputs': [
- 'copy.py',
- 'input.txt',
- ],
- 'outputs': [
- 'multi1.txt',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<(_outputs)', '<(long_string)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'action2',
- 'inputs': [
- 'copy.py',
- 'input.txt',
- ],
- 'outputs': [
- 'multi2.txt',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<(_outputs)', '<(long_string)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- 'dependencies': [
- 'multiple_required_target',
- ],
- },
- {
- 'target_name': 'multiple_required_target',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'multi_dep',
- 'inputs': [
- 'copy.py',
- 'input.txt',
- ],
- 'outputs': [
- 'multi_dep.txt',
- ],
- 'process_outputs_as_sources': 1,
- 'action': [
- 'python', '<@(_inputs)', '<(_outputs)', '<(long_string)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import shutil
-import sys
-
-shutil.copyfile(sys.argv[1], sys.argv[2])
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-import sys
-
-data = open(sys.argv[3], 'r').read()
-fh = open(sys.argv[4], 'w')
-fh.write(data.replace(sys.argv[1], sys.argv[2]))
-fh.close()
+++ /dev/null
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-void foo(void) {
- printf("foo\n");
-}
+++ /dev/null
-hello there
+++ /dev/null
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-void bar(void);
-void car(void);
-void dar(void);
-void ear(void);
-
-int main() {
- printf("{\n");
- bar();
- car();
- dar();
- ear();
- printf("}\n");
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies actions can be in 'none' type targets with source files.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-# TODO(bradnelson): fix scons.
-if test.format == 'scons':
- test.skip_test()
-
-test.run_gyp('none_with_source_files.gyp', chdir='src')
-test.relocate('src', 'relocate/src')
-test.build('none_with_source_files.gyp', chdir='relocate/src')
-
-file_content = 'foo.cc\n'
-
-test.built_file_must_match('fake.out', file_content, chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-import sys
-
-fh = open(sys.argv[-1], 'wb')
-for filename in sys.argv[1:-1]:
- fh.write(open(filename).read())
-fh.close()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Test that 'none' type targets can have .cc files in them.
-
-{
- 'targets': [
- {
- 'target_name': 'none_with_sources',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'foo.cc',
- ],
- 'actions': [
- {
- 'action_name': 'fake_cross',
- 'inputs': [
- 'fake_cross.py',
- '<@(_sources)',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/fake.out',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<@(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- }
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test actions that output to PRODUCT_DIR.
-"""
-
-import TestGyp
-
-# TODO fix this for xcode: http://code.google.com/p/gyp/issues/detail?id=88
-test = TestGyp.TestGyp(formats=['!xcode'])
-
-test.run_gyp('none.gyp', chdir='src')
-
-test.build('none.gyp', test.ALL, chdir='src')
-
-file_content = 'Hello from make-file.py\n'
-subdir_file_content = 'Hello from make-subdir-file.py\n'
-
-test.built_file_must_match('file.out', file_content, chdir='src')
-test.built_file_must_match('subdir_file.out', subdir_file_content, chdir='src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = 'Hello from make-file.py\n'
-
-open(sys.argv[1], 'wb').write(contents)
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'file',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'actions': [
- {
- 'action_name': 'make-file',
- 'inputs': [
- 'make-file.py',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/file.out',
- ],
- 'action': [
- 'python', '<(_inputs)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- }
- ],
- 'dependencies': [
- 'subdir/subdir.gyp:subdir_file',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = 'Hello from make-subdir-file.py\n'
-
-open(sys.argv[1], 'wb').write(contents)
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'subdir_file',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'actions': [
- {
- 'action_name': 'make-subdir-file',
- 'inputs': [
- 'make-subdir-file.py',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/subdir_file.out',
- ],
- 'action': [
- 'python', '<(_inputs)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- }
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple actions when using an explicit build target of 'all'.
-"""
-
-import glob
-import os
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_all')
-
-test.run_gyp('actions.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-# Some gyp files use an action that mentions an output but never
-# writes it as a means to making the action run on every build. That
-# doesn't mesh well with ninja's semantics. TODO(evan): figure out
-# how to work always-run actions in to ninja.
-# Android also can't do this as it doesn't have order-only dependencies.
-if test.format in ['ninja', 'android']:
- test.build('actions.gyp', test.ALL, chdir='relocate/src')
-else:
- # Test that an "always run" action increases a counter on multiple
- # invocations, and that a dependent action updates in step.
- test.build('actions.gyp', test.ALL, chdir='relocate/src')
- test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '1')
- test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '1')
- test.build('actions.gyp', test.ALL, chdir='relocate/src')
- test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '2')
- test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '2')
-
- # The "always run" action only counts to 2, but the dependent target
- # will count forever if it's allowed to run. This verifies that the
- # dependent target only runs when the "always run" action generates
- # new output, not just because the "always run" ran.
- test.build('actions.gyp', test.ALL, chdir='relocate/src')
- test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '2')
- test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '2')
-
-expect = """\
-Hello from program.c
-Hello from make-prog1.py
-Hello from make-prog2.py
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir1'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('program', chdir=chdir, stdout=expect)
-
-
-test.must_match('relocate/src/subdir2/file.out', "Hello from make-file.py\n")
-
-
-expect = "Hello from generate_main.py\n"
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir3'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('null_input', chdir=chdir, stdout=expect)
-
-
-# Clean out files which may have been created if test.ALL was run.
-def clean_dep_files():
- for file in (glob.glob('relocate/src/dep_*.txt') +
- glob.glob('relocate/src/deps_all_done_*.txt')):
- if os.path.exists(file):
- os.remove(file)
-
-# Confirm our clean.
-clean_dep_files()
-test.must_not_exist('relocate/src/dep_1.txt')
-test.must_not_exist('relocate/src/deps_all_done_first_123.txt')
-
-# Make sure all deps finish before an action is run on a 'None' target.
-# If using the Make builder, add -j to make things more difficult.
-arguments = []
-if test.format == 'make':
- arguments = ['-j']
-test.build('actions.gyp', 'action_with_dependencies_123', chdir='relocate/src',
- arguments=arguments)
-test.must_exist('relocate/src/deps_all_done_first_123.txt')
-
-# Try again with a target that has deps in reverse. Output files from
-# previous tests deleted. Confirm this execution did NOT run the ALL
-# target which would mess up our dep tests.
-clean_dep_files()
-test.build('actions.gyp', 'action_with_dependencies_321', chdir='relocate/src',
- arguments=arguments)
-test.must_exist('relocate/src/deps_all_done_first_321.txt')
-test.must_not_exist('relocate/src/deps_all_done_first_123.txt')
-
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple actions when using the default build target.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_default')
-
-test.run_gyp('actions.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-# Some gyp files use an action that mentions an output but never
-# writes it as a means to making the action run on every build. That
-# doesn't mesh well with ninja's semantics. TODO(evan): figure out
-# how to work always-run actions in to ninja.
-# Android also can't do this as it doesn't have order-only dependencies.
-if test.format in ['ninja', 'android']:
- test.build('actions.gyp', test.ALL, chdir='relocate/src')
-else:
- # Test that an "always run" action increases a counter on multiple
- # invocations, and that a dependent action updates in step.
- test.build('actions.gyp', chdir='relocate/src')
- test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '1')
- test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '1')
- test.build('actions.gyp', chdir='relocate/src')
- test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '2')
- test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '2')
-
- # The "always run" action only counts to 2, but the dependent target
- # will count forever if it's allowed to run. This verifies that the
- # dependent target only runs when the "always run" action generates
- # new output, not just because the "always run" ran.
- test.build('actions.gyp', test.ALL, chdir='relocate/src')
- test.must_match('relocate/src/subdir1/actions-out/action-counter.txt', '2')
- test.must_match('relocate/src/subdir1/actions-out/action-counter_2.txt', '2')
-
-expect = """\
-Hello from program.c
-Hello from make-prog1.py
-Hello from make-prog2.py
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir1'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('program', chdir=chdir, stdout=expect)
-
-
-test.must_match('relocate/src/subdir2/file.out', "Hello from make-file.py\n")
-
-
-expect = "Hello from generate_main.py\n"
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir3'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('null_input', chdir=chdir, stdout=expect)
-
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies behavior for different action configuration errors:
-exit status of 1, and the expected error message must be in stderr.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_errors')
-
-
-test.run_gyp('action_missing_name.gyp', chdir='src', status=1, stderr=None)
-expect = [
- "Anonymous action in target broken_actions2. An action must have an 'action_name' field.",
-]
-test.must_contain_all_lines(test.stderr(), expect)
-
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'broken_actions2',
- 'type': 'none',
- 'actions': [
- {
- 'inputs': [
- 'no_name.input',
- ],
- 'action': [
- 'python',
- '-c',
- 'print \'missing name\'',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'pull_in_all_actions',
- 'type': 'none',
- 'dependencies': [
- 'subdir1/executable.gyp:*',
- 'subdir2/none.gyp:*',
- 'subdir3/null_input.gyp:*',
- ],
- },
- {
- 'target_name': 'depend_on_always_run_action',
- 'type': 'none',
- 'dependencies': [ 'subdir1/executable.gyp:counter' ],
- 'actions': [
- {
- 'action_name': 'use_always_run_output',
- 'inputs': [
- 'subdir1/actions-out/action-counter.txt',
- 'subdir1/counter.py',
- ],
- 'outputs': [
- 'subdir1/actions-out/action-counter_2.txt',
- ],
- 'action': [
- 'python', 'subdir1/counter.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
-
- # Three deps which don't finish immediately.
- # Each one has a small delay then creates a file.
- # Delays are 1.0, 1.1, and 2.0 seconds.
- {
- 'target_name': 'dep_1',
- 'type': 'none',
- 'actions': [{
- 'inputs': [ 'actions.gyp' ],
- 'outputs': [ 'dep_1.txt' ],
- 'action_name': 'dep_1',
- 'action': [ 'python', '-c',
- 'import time; time.sleep(1); open(\'dep_1.txt\', \'w\')' ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- }],
- },
- {
- 'target_name': 'dep_2',
- 'type': 'none',
- 'actions': [{
- 'inputs': [ 'actions.gyp' ],
- 'outputs': [ 'dep_2.txt' ],
- 'action_name': 'dep_2',
- 'action': [ 'python', '-c',
- 'import time; time.sleep(1.1); open(\'dep_2.txt\', \'w\')' ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- }],
- },
- {
- 'target_name': 'dep_3',
- 'type': 'none',
- 'actions': [{
- 'inputs': [ 'actions.gyp' ],
- 'outputs': [ 'dep_3.txt' ],
- 'action_name': 'dep_3',
- 'action': [ 'python', '-c',
- 'import time; time.sleep(2.0); open(\'dep_3.txt\', \'w\')' ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- }],
- },
-
- # An action which assumes the deps have completed.
- # Does NOT list the output files of it's deps as inputs.
- # On success create the file deps_all_done_first.txt.
- {
- 'target_name': 'action_with_dependencies_123',
- 'type': 'none',
- 'dependencies': [ 'dep_1', 'dep_2', 'dep_3' ],
- 'actions': [{
- 'inputs': [ 'actions.gyp' ],
- 'outputs': [ 'deps_all_done_first_123.txt' ],
- 'action_name': 'action_with_dependencies_123',
- 'action': [ 'python', 'confirm-dep-files.py', '<(_outputs)' ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- }],
- },
- # Same as above but with deps in reverse.
- {
- 'target_name': 'action_with_dependencies_321',
- 'type': 'none',
- 'dependencies': [ 'dep_3', 'dep_2', 'dep_1' ],
- 'actions': [{
- 'inputs': [ 'actions.gyp' ],
- 'outputs': [ 'deps_all_done_first_321.txt' ],
- 'action_name': 'action_with_dependencies_321',
- 'action': [ 'python', 'confirm-dep-files.py', '<(_outputs)' ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- }],
- },
-
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Confirms presence of files generated by our targets we depend on.
-If they exist, create a new file.
-
-Note target's input files are explicitly NOT defined in the gyp file
-so they can't easily be passed to this script as args.
-"""
-
-import os
-import sys
-
-outfile = sys.argv[1] # Example value we expect: deps_all_done_first_123.txt
-if (os.path.exists("dep_1.txt") and
- os.path.exists("dep_2.txt") and
- os.path.exists("dep_3.txt")):
- open(outfile, "w")
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-import time
-
-output = sys.argv[1]
-persistoutput = "%s.persist" % sys.argv[1]
-
-count = 0
-try:
- count = open(persistoutput, 'r').read()
-except:
- pass
-count = int(count) + 1
-
-if len(sys.argv) > 2:
- max_count = int(sys.argv[2])
- if count > max_count:
- count = max_count
-
-oldcount = 0
-try:
- oldcount = open(output, 'r').read()
-except:
- pass
-
-# Save the count in a file that is undeclared, and thus hidden, to gyp. We need
-# to do this because, prior to running commands, scons deletes any declared
-# outputs, so we would lose our count if we just wrote to the given output file.
-# (The other option is to use Precious() in the scons generator, but that seems
-# too heavy-handed just to support this somewhat unrealistic test case, and
-# might lead to unintended side-effects).
-open(persistoutput, 'w').write('%d' % (count))
-
-# Only write the given output file if the count has changed.
-if int(oldcount) != count:
- open(output, 'w').write('%d' % (count))
- # Sleep so the next run changes the file time sufficiently to make the build
- # detect the file as changed.
- time.sleep(1)
-
-sys.exit(0)
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'program.c',
- ],
- 'actions': [
- {
- 'action_name': 'make-prog1',
- 'inputs': [
- 'make-prog1.py',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/prog1.c',
- ],
- 'action': [
- 'python', '<(_inputs)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- {
- 'action_name': 'make-prog2',
- 'inputs': [
- 'make-prog2.py',
- ],
- 'outputs': [
- 'actions-out/prog2.c',
- ],
- 'action': [
- 'python', '<(_inputs)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'counter',
- 'type': 'none',
- 'actions': [
- {
- # This action should always run, regardless of whether or not it's
- # inputs or the command-line change. We do this by creating a dummy
- # first output, which is always missing, thus causing the build to
- # always try to recreate it. Actual output files should be listed
- # after the dummy one, and dependent targets should list the real
- # output(s) in their inputs
- # (see '../actions.gyp:depend_on_always_run_action').
- 'action_name': 'action_counter',
- 'inputs': [
- 'counter.py',
- ],
- 'outputs': [
- 'actions-out/action-counter.txt.always',
- 'actions-out/action-counter.txt',
- ],
- 'action': [
- 'python', '<(_inputs)', 'actions-out/action-counter.txt', '2',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = r"""
-#include <stdio.h>
-
-void prog1(void)
-{
- printf("Hello from make-prog1.py\n");
-}
-"""
-
-open(sys.argv[1], 'w').write(contents)
-
-sys.exit(0)
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = r"""
-#include <stdio.h>
-
-void prog2(void)
-{
- printf("Hello from make-prog2.py\n");
-}
-"""
-
-open(sys.argv[1], 'w').write(contents)
-
-sys.exit(0)
+++ /dev/null
-#include <stdio.h>\r
-\r
-extern void prog1(void);\r
-extern void prog2(void);\r
-\r
-int main(int argc, char *argv[])\r
-{\r
- printf("Hello from program.c\n");\r
- prog1();\r
- prog2();\r
- return 0;\r
-}\r
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = "Hello from make-file.py\n"
-
-open(sys.argv[1], 'wb').write(contents)
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'file',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'actions': [
- {
- 'action_name': 'make-file',
- 'inputs': [
- 'make-file.py',
- ],
- 'outputs': [
- 'file.out',
- # TODO: enhance testing infrastructure to test this
- # without having to hard-code the intermediate dir paths.
- #'<(INTERMEDIATE_DIR)/file.out',
- ],
- 'action': [
- 'python', '<(_inputs)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- }
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = """
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from generate_main.py\\n");
- return 0;
-}
-"""
-
-open(sys.argv[1], 'w').write(contents)
-
-sys.exit(0)
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'null_input',
- 'type': 'executable',
- 'msvs_cygwin_shell': 0,
- 'actions': [
- {
- 'action_name': 'generate_main',
- 'process_outputs_as_sources': 1,
- 'inputs': [],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/main.c',
- ],
- 'action': [
- # TODO: we can't just use <(_outputs) here?!
- 'python', 'generate_main.py', '<(INTERMEDIATE_DIR)/main.c',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple actions when using an explicit build target of 'all'.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('all.gyp', chdir='src')
-test.relocate('src', 'relocate/src')
-
-# Build all.
-test.build('all.gyp', chdir='relocate/src')
-
-if test.format=='xcode':
- chdir = 'relocate/src/dir1'
-else:
- chdir = 'relocate/src'
-
-# Output is as expected.
-file_content = 'Hello from emit.py\n'
-test.built_file_must_match('out2.txt', file_content, chdir=chdir)
-
-test.built_file_must_not_exist('out.txt', chdir='relocate/src')
-test.built_file_must_not_exist('foolib1',
- type=test.SHARED_LIB,
- chdir=chdir)
-
-# TODO(mmoss) Make consistent with scons, with 'dir1' before 'out/Default'?
-if test.format in ('make', 'ninja', 'android'):
- chdir='relocate/src'
-else:
- chdir='relocate/src/dir1'
-
-# Build the action explicitly.
-test.build('actions.gyp', 'action1_target', chdir=chdir)
-
-# Check that things got run.
-file_content = 'Hello from emit.py\n'
-test.built_file_must_exist('out.txt', chdir=chdir)
-
-# Build the shared library explicitly.
-test.build('actions.gyp', 'foolib1', chdir=chdir)
-
-test.built_file_must_exist('foolib1',
- type=test.SHARED_LIB,
- chdir=chdir,
- subdir='dir1')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'all_targets',
- 'type': 'none',
- 'dependencies': ['dir1/actions.gyp:*'],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'action1_target',
- 'type': 'none',
- 'suppress_wildcard': 1,
- 'actions': [
- {
- 'action_name': 'action1',
- 'inputs': [
- 'emit.py',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/out.txt',
- ],
- 'action': ['python', 'emit.py', '<(PRODUCT_DIR)/out.txt'],
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'action2_target',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'action2',
- 'inputs': [
- 'emit.py',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/out2.txt',
- ],
- 'action': ['python', 'emit.py', '<(PRODUCT_DIR)/out2.txt'],
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'foolib1',
- 'type': 'shared_library',
- 'suppress_wildcard': 1,
- 'sources': ['lib1.c'],
- },
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'target_defaults': {
- 'cflags': ['-fPIC'],
- },
- }],
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-f = open(sys.argv[1], 'wb')
-f.write('Hello from emit.py\n')
-f.close()
+++ /dev/null
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-int func1(void) {
- return 42;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-A basic test of compiling assembler files.
-"""
-
-import sys
-import TestGyp
-
-if sys.platform != 'win32':
- # TODO(bradnelson): get this working for windows.
- test = TestGyp.TestGyp(formats=['!msvs'])
-
- test.run_gyp('assembly.gyp', chdir='src')
-
- test.relocate('src', 'relocate/src')
-
- test.build('assembly.gyp', test.ALL, chdir='relocate/src')
-
- expect = """\
-Hello from program.c
-Got 42.
-"""
- test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
- test.pass_test()
+++ /dev/null
-@echo off
-:: Mock windows assembler.
-cl /c %1 /Fo"%2"
-
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'conditions': [
- ['OS=="win"', {
- 'defines': ['PLATFORM_WIN'],
- }],
- ['OS=="mac"', {
- 'defines': ['PLATFORM_MAC'],
- }],
- ['OS=="linux"', {
- 'defines': ['PLATFORM_LINUX'],
- }],
- ['OS=="android"', {
- 'defines': ['PLATFORM_ANDROID'],
- }],
- ],
- },
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'dependencies': ['lib1'],
- 'sources': [
- 'program.c',
- ],
- },
- {
- 'target_name': 'lib1',
- 'type': 'static_library',
- 'sources': [
- 'lib1.S',
- ],
- },
- ],
- 'conditions': [
- ['OS=="win"', {
- 'target_defaults': {
- 'rules': [
- {
- 'rule_name': 'assembler',
- 'msvs_cygwin_shell': 0,
- 'extension': 'S',
- 'inputs': [
- 'as.bat',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj',
- ],
- 'action':
- ['as.bat', 'lib1.c', '<(_outputs)'],
- 'message': 'Building assembly file <(RULE_INPUT_PATH)',
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- },],
- ],
-}
+++ /dev/null
-#if PLATFORM_WINDOWS || PLATFORM_MAC
-# define IDENTIFIER(n) _##n
-#else /* Linux */
-# define IDENTIFIER(n) n
-#endif
-
-.globl IDENTIFIER(lib1_function)
-IDENTIFIER(lib1_function):
-#if !defined(PLATFORM_ANDROID)
- movl $42, %eax
- ret
-#else /* Android (assuming ARM) */
- mov r0, #42
- bx lr
-#endif
+++ /dev/null
-int lib1_function(void) {
- return 42;
-}
+++ /dev/null
-#include <stdio.h>
-
-extern int lib1_function(void);
-
-int main(int argc, char *argv[])
-{
- fprintf(stdout, "Hello from program.c\n");
- fflush(stdout);
- fprintf(stdout, "Got %d.\n", lib1_function());
- fflush(stdout);
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simplest-possible build of a "Hello, world!" program
-using the default build target.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_default')
-
-test.run_gyp('hello.gyp', '--build=Default')
-
-test.run_built_executable('hello', stdout="Hello, world!\n")
-
-test.up_to_date('hello.gyp', test.DEFAULT)
-
-test.pass_test()
+++ /dev/null
-/*
- * Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello, world!\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify the settings that cause a set of programs to be created in
-a specific build directory, and that no intermediate built files
-get created outside of that build directory hierarchy even when
-referred to with deeply-nested ../../.. paths.
-"""
-
-import TestGyp
-
-# TODO(mmoss): Make only supports (theoretically) a single, global build
-# directory (through GYP_GENERATOR_FLAGS 'output_dir'), rather than
-# gyp-file-specific settings (e.g. the stuff in builddir.gypi) that the other
-# generators support, so this doesn't work yet for make.
-# TODO(mmoss) Make also has the issue that the top-level Makefile is written to
-# the "--depth" location, which is one level above 'src', but then this test
-# moves 'src' somewhere else, leaving the Makefile behind, so make can't find
-# its sources. I'm not sure if make is wrong for writing outside the current
-# directory, or if the test is wrong for assuming everything generated is under
-# the current directory.
-# Android does not support setting the build directory.
-test = TestGyp.TestGyp(formats=['!make', '!ninja', '!android'])
-
-test.run_gyp('prog1.gyp', '--depth=..', chdir='src')
-if test.format == 'msvs':
- if test.uses_msbuild:
- test.must_contain('src/prog1.vcxproj',
- '<OutDir>..\\builddir\\Default\\</OutDir>')
- else:
- test.must_contain('src/prog1.vcproj',
- 'OutputDirectory="..\\builddir\\Default\\"')
-
-test.relocate('src', 'relocate/src')
-
-test.subdir('relocate/builddir')
-
-# Make sure that all the built ../../etc. files only get put under builddir,
-# by making all of relocate read-only and then making only builddir writable.
-test.writable('relocate', False)
-test.writable('relocate/builddir', True)
-
-# Suppress the test infrastructure's setting SYMROOT on the command line.
-test.build('prog1.gyp', test.ALL, SYMROOT=None, chdir='relocate/src')
-
-expect1 = """\
-Hello from prog1.c
-Hello from func1.c
-"""
-
-expect2 = """\
-Hello from subdir2/prog2.c
-Hello from func2.c
-"""
-
-expect3 = """\
-Hello from subdir2/subdir3/prog3.c
-Hello from func3.c
-"""
-
-expect4 = """\
-Hello from subdir2/subdir3/subdir4/prog4.c
-Hello from func4.c
-"""
-
-expect5 = """\
-Hello from subdir2/subdir3/subdir4/subdir5/prog5.c
-Hello from func5.c
-"""
-
-def run_builddir(prog, expect):
- dir = 'relocate/builddir/Default/'
- test.run(program=test.workpath(dir + prog), stdout=expect)
-
-run_builddir('prog1', expect1)
-run_builddir('prog2', expect2)
-run_builddir('prog3', expect3)
-run_builddir('prog4', expect4)
-run_builddir('prog5', expect5)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify the settings that cause a set of programs to be created in
-a specific build directory, and that no intermediate built files
-get created outside of that build directory hierarchy even when
-referred to with deeply-nested ../../.. paths.
-"""
-
-import TestGyp
-
-# TODO(mmoss): Make only supports (theoretically) a single, global build
-# directory (through GYP_GENERATOR_FLAGS 'output_dir'), rather than
-# gyp-file-specific settings (e.g. the stuff in builddir.gypi) that the other
-# generators support, so this doesn't work yet for make.
-# TODO(mmoss) Make also has the issue that the top-level Makefile is written to
-# the "--depth" location, which is one level above 'src', but then this test
-# moves 'src' somewhere else, leaving the Makefile behind, so make can't find
-# its sources. I'm not sure if make is wrong for writing outside the current
-# directory, or if the test is wrong for assuming everything generated is under
-# the current directory.
-# Android does not support setting the build directory.
-test = TestGyp.TestGyp(formats=['!make', '!ninja', '!android'])
-
-test.run_gyp('prog1.gyp', '--depth=..', chdir='src')
-if test.format == 'msvs':
- if test.uses_msbuild:
- test.must_contain('src/prog1.vcxproj',
- '<OutDir>..\\builddir\\Default\\</OutDir>')
- else:
- test.must_contain('src/prog1.vcproj',
- 'OutputDirectory="..\\builddir\\Default\\"')
-
-test.relocate('src', 'relocate/src')
-
-test.subdir('relocate/builddir')
-
-# Make sure that all the built ../../etc. files only get put under builddir,
-# by making all of relocate read-only and then making only builddir writable.
-test.writable('relocate', False)
-test.writable('relocate/builddir', True)
-
-# Suppress the test infrastructure's setting SYMROOT on the command line.
-test.build('prog1.gyp', SYMROOT=None, chdir='relocate/src')
-
-expect1 = """\
-Hello from prog1.c
-Hello from func1.c
-"""
-
-expect2 = """\
-Hello from subdir2/prog2.c
-Hello from func2.c
-"""
-
-expect3 = """\
-Hello from subdir2/subdir3/prog3.c
-Hello from func3.c
-"""
-
-expect4 = """\
-Hello from subdir2/subdir3/subdir4/prog4.c
-Hello from func4.c
-"""
-
-expect5 = """\
-Hello from subdir2/subdir3/subdir4/subdir5/prog5.c
-Hello from func5.c
-"""
-
-def run_builddir(prog, expect):
- dir = 'relocate/builddir/Default/'
- test.run(program=test.workpath(dir + prog), stdout=expect)
-
-run_builddir('prog1', expect1)
-run_builddir('prog2', expect2)
-run_builddir('prog3', expect3)
-run_builddir('prog4', expect4)
-run_builddir('prog5', expect5)
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'configurations': {
- 'Default': {
- 'msvs_configuration_attributes': {
- 'OutputDirectory': '<(DEPTH)\\builddir/Default',
- },
- },
- },
- },
- 'scons_settings': {
- 'sconsbuild_dir': '<(DEPTH)/builddir',
- },
- 'xcode_settings': {
- 'SYMROOT': '<(DEPTH)/builddir',
- },
-}
+++ /dev/null
-#include <stdio.h>
-
-void func1(void)
-{
- printf("Hello from func1.c\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-void func2(void)
-{
- printf("Hello from func2.c\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-void func3(void)
-{
- printf("Hello from func3.c\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-void func4(void)
-{
- printf("Hello from func4.c\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-void func5(void)
-{
- printf("Hello from func5.c\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void func1(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog1.c\n");
- func1();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- 'builddir.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'pull_in_all',
- 'type': 'none',
- 'dependencies': [
- 'prog1',
- 'subdir2/prog2.gyp:prog2',
- 'subdir2/subdir3/prog3.gyp:prog3',
- 'subdir2/subdir3/subdir4/prog4.gyp:prog4',
- 'subdir2/subdir3/subdir4/subdir5/prog5.gyp:prog5',
- ],
- },
- {
- 'target_name': 'prog1',
- 'type': 'executable',
- 'sources': [
- 'prog1.c',
- 'func1.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void func2(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from subdir2/prog2.c\n");
- func2();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../builddir.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog2',
- 'type': 'executable',
- 'sources': [
- 'prog2.c',
- '../func2.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void func3(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from subdir2/subdir3/prog3.c\n");
- func3();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../../builddir.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog3',
- 'type': 'executable',
- 'sources': [
- 'prog3.c',
- '../../func3.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void func4(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from subdir2/subdir3/subdir4/prog4.c\n");
- func4();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../../../builddir.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog4',
- 'type': 'executable',
- 'sources': [
- 'prog4.c',
- '../../../func4.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void func5(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from subdir2/subdir3/subdir4/subdir5/prog5.c\n");
- func5();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../../../../builddir.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog5',
- 'type': 'executable',
- 'sources': [
- 'prog5.c',
- '../../../../func5.c',
- ],
- },
- ],
-}
+++ /dev/null
-/* Copyright (c) 2010 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef __OPTIMIZE__
- printf("Using an optimization flag\n");
-#else
- printf("Using no optimization flag\n");
-#endif
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'cflags',
- 'type': 'executable',
- 'opt': '-Os',
- 'sources': [
- 'cflags.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable with C++ define specified by a gyp define, and
-the use of the environment during regeneration when the gyp file changes.
-"""
-
-import os
-import TestGyp
-
-env_stack = []
-
-
-def PushEnv():
- env_copy = os.environ.copy()
- env_stack.append(env_copy)
-
-def PopEnv():
- os.eniron=env_stack.pop()
-
-# Regenerating build files when a gyp file changes is currently only supported
-# by the make and Android generators.
-test = TestGyp.TestGyp(formats=['make', 'android'])
-
-try:
- PushEnv()
- os.environ['CFLAGS'] = '-O0'
- test.run_gyp('cflags.gyp')
-finally:
- # We clear the environ after calling gyp. When the auto-regeneration happens,
- # the same define should be reused anyway. Reset to empty string first in
- # case the platform doesn't support unsetenv.
- PopEnv()
-
-test.build('cflags.gyp')
-
-expect = """\
-Using no optimization flag
-"""
-test.run_built_executable('cflags', stdout=expect)
-
-test.sleep()
-
-try:
- PushEnv()
- os.environ['CFLAGS'] = '-O2'
- test.run_gyp('cflags.gyp')
-finally:
- # We clear the environ after calling gyp. When the auto-regeneration happens,
- # the same define should be reused anyway. Reset to empty string first in
- # case the platform doesn't support unsetenv.
- PopEnv()
-
-test.build('cflags.gyp')
-
-expect = """\
-Using an optimization flag
-"""
-test.run_built_executable('cflags', stdout=expect)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that .hpp files are ignored when included in the source list on all
-platforms.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('headers.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('headers.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from program.c
-Hello from lib1.c
-"""
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'dependencies': [
- 'lib1'
- ],
- 'sources': [
- 'program.cpp',
- ],
- },
- {
- 'target_name': 'lib1',
- 'type': 'static_library',
- 'sources': [
- 'lib1.hpp',
- 'lib1.cpp',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-#include "lib1.hpp"
-
-void lib1_function(void) {
- fprintf(stdout, "Hello from lib1.c\n");
- fflush(stdout);
-}
+++ /dev/null
-#ifndef _lib1_hpp
-#define _lib1_hpp
-
-extern void lib1_function(void);
-
-#endif
+++ /dev/null
-#include <stdio.h>
-#include "lib1.hpp"
-
-int main(int argc, char *argv[]) {
- fprintf(stdout, "Hello from program.c\n");
- fflush(stdout);
- lib1_function();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- # PYTHON and PWD are replaced by the test code before this
- # gyp file runs
- 'make_global_settings': [
- ['CC', r'$PYTHON $PWD/my_cc.py FOO'],
- ['CXX', r'$PYTHON $PWD/my_cxx.py FOO'],
- ['CC.host', r'$PYTHON $PWD/my_cc.py BAR'],
- ['CXX.host', r'$PYTHON $PWD/my_cxx.py BAR'],
-
- ['LD', r'$PYTHON $PWD/my_ld.py FOO_LINK'],
- ['LD.host', r'$PYTHON $PWD/my_ld.py BAR_LINK'],
- ['LINK', r'$PYTHON $PWD/my_ld.py FOO_LINK'],
- ['LINK.host', r'$PYTHON $PWD/my_ld.py BAR_LINK'],
- ],
-
- # The above global settings should mean that
- # that these targets are built using the fake
- # toolchain above.
- 'targets': [
- {
- 'toolset': '$TOOLSET',
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'test.c',
- 'cxxtest.cc',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'toolset': 'host',
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'test.c',
- 'cxxtest.cc',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'test.c',
- 'cxxtest.cc',
- ],
- },
- ],
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Deliberate C syntax error as this file should never be passed to
-// the actual compiler
-#error Should not be passed to a real compiler
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-"""
-Verifies that the user can override the compiler and linker using CC/CXX/LD
-environment variables.
-"""
-
-import TestGyp
-import os
-import copy
-import sys
-
-here = os.path.dirname(os.path.abspath(__file__))
-
-if sys.platform == 'win32':
- # cross compiling not support by ninja on windows
- # and make not supported on windows at all.
- sys.exit(0)
-
-test = TestGyp.TestGyp(formats=['ninja', 'make'])
-
-def CheckCompiler(test, gypfile, check_for):
- test.run_gyp(gypfile)
- test.build(gypfile)
-
- # We can't test to presence of my_ld.py in the output since
- # ninja will use CXX_target as the linker regardless
- test.must_contain_all_lines(test.stdout(), check_for)
-
-oldenv = os.environ.copy()
-try:
- # Check that CC, CXX and LD set target compiler
- os.environ['CC'] = 'python %s/my_cc.py FOO' % here
- os.environ['CXX'] = 'python %s/my_cxx.py FOO' % here
- os.environ['LD'] = 'python %s/my_ld.py FOO_LINK' % here
- CheckCompiler(test, 'compiler.gyp',
- ['my_cc.py', 'my_cxx.py', 'FOO', 'FOO_LINK'])
-finally:
- os.environ.clear()
- os.environ.update(oldenv)
-
-try:
- # Check that CC_host sets host compilee
- os.environ['CC_host'] = 'python %s/my_cc.py HOST' % here
- os.environ['CXX_host'] = 'python %s/my_cxx.py HOST' % here
- os.environ['LD_host'] = 'python %s/my_ld.py HOST_LINK' % here
- CheckCompiler(test, 'compiler-host.gyp',
- ['my_cc.py', 'my_cxx.py', 'HOST', 'HOST_LINK'])
-finally:
- os.environ.clear()
- os.environ.update(oldenv)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-"""
-Verifies that make_global_settings can be used to override the
-compiler settings.
-"""
-
-import TestGyp
-import os
-import copy
-import sys
-from string import Template
-
-
-if sys.platform == 'win32':
- # cross compiling not support by ninja on windows
- # and make not supported on windows at all.
- sys.exit(0)
-
-test = TestGyp.TestGyp(formats=['ninja', 'make'])
-
-gypfile = 'compiler-global-settings.gyp'
-
-replacements = { 'PYTHON': '/usr/bin/python', 'PWD': os.getcwd()}
-
-# Process the .in gyp file to produce the final gyp file
-# since we need to include absolute paths in the make_global_settings
-# section.
-replacements['TOOLSET'] = 'target'
-s = Template(open(gypfile + '.in').read())
-output = open(gypfile, 'w')
-output.write(s.substitute(replacements))
-output.close()
-
-test.run_gyp(gypfile)
-test.build(gypfile)
-test.must_contain_all_lines(test.stdout(), ['my_cc.py', 'my_cxx.py', 'FOO'])
-
-# Same again but with the host toolset.
-replacements['TOOLSET'] = 'host'
-s = Template(open(gypfile + '.in').read())
-output = open(gypfile, 'w')
-output.write(s.substitute(replacements))
-output.close()
-
-test.run_gyp(gypfile)
-test.build(gypfile)
-test.must_contain_all_lines(test.stdout(), ['my_cc.py', 'my_cxx.py', 'BAR'])
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import sys
-print sys.argv
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import sys
-print sys.argv
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import sys
-print sys.argv
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Deliberate C syntax error as this file should never be passed to
-// the actual compiler
-#error Should not be passed to a real compiler
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef FOO
- printf("Foo configuration\n");
-#endif
-#ifdef DEBUG
- printf("Debug configuration\n");
-#endif
-#ifdef RELEASE
- printf("Release configuration\n");
-#endif
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'executable',
- 'sources': [
- 'configurations.c',
- ],
- 'configurations': {
- 'Debug': {
- 'defines': [
- 'DEBUG',
- ],
- },
- 'Release': {
- 'defines': [
- 'RELEASE',
- ],
- },
- 'Foo': {
- 'defines': [
- 'FOO',
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable in three different configurations.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('configurations.gyp')
-
-test.set_configuration('Release')
-test.build('configurations.gyp')
-test.run_built_executable('configurations', stdout="Release configuration\n")
-
-test.set_configuration('Debug')
-test.build('configurations.gyp')
-test.run_built_executable('configurations', stdout="Debug configuration\n")
-
-test.set_configuration('Foo')
-test.build('configurations.gyp')
-test.run_built_executable('configurations', stdout="Foo configuration\n")
-
-test.pass_test()
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef BASE
- printf("Base configuration\n");
-#endif
-#ifdef COMMON
- printf("Common configuration\n");
-#endif
-#ifdef COMMON2
- printf("Common2 configuration\n");
-#endif
-#ifdef DEBUG
- printf("Debug configuration\n");
-#endif
-#ifdef RELEASE
- printf("Release configuration\n");
-#endif
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'configurations': {
- 'Base': {
- 'abstract': 1,
- 'defines': ['BASE'],
- },
- 'Common': {
- 'abstract': 1,
- 'inherit_from': ['Base'],
- 'defines': ['COMMON'],
- },
- 'Common2': {
- 'abstract': 1,
- 'defines': ['COMMON2'],
- },
- 'Debug': {
- 'inherit_from': ['Common', 'Common2'],
- 'defines': ['DEBUG'],
- },
- 'Release': {
- 'inherit_from': ['Common', 'Common2'],
- 'defines': ['RELEASE'],
- },
- },
- },
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'executable',
- 'sources': [
- 'configurations.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable in three different configurations.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('configurations.gyp')
-
-test.set_configuration('Release')
-test.build('configurations.gyp')
-test.run_built_executable('configurations',
- stdout=('Base configuration\n'
- 'Common configuration\n'
- 'Common2 configuration\n'
- 'Release configuration\n'))
-
-test.set_configuration('Debug')
-test.build('configurations.gyp')
-test.run_built_executable('configurations',
- stdout=('Base configuration\n'
- 'Common configuration\n'
- 'Common2 configuration\n'
- 'Debug configuration\n'))
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'actions': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'all_dependent_settings': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'configurations': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'dependencies': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'direct_dependent_settings': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable in three different configurations.
-"""
-
-import TestGyp
-
-# Keys that do not belong inside a configuration dictionary.
-invalid_configuration_keys = [
- 'actions',
- 'all_dependent_settings',
- 'configurations',
- 'dependencies',
- 'direct_dependent_settings',
- 'libraries',
- 'link_settings',
- 'sources',
- 'standalone_static_library',
- 'target_name',
- 'type',
-]
-
-test = TestGyp.TestGyp()
-
-if test.format == 'scons':
- test.skip_test('TODO: http://code.google.com/p/gyp/issues/detail?id=176\n')
-
-for test_key in invalid_configuration_keys:
- test.run_gyp('%s.gyp' % test_key, status=1, stderr=None)
- expect = ['%s not allowed in the Debug configuration, found in target '
- '%s.gyp:configurations#target' % (test_key, test_key)]
- test.must_contain_all_lines(test.stderr(), expect)
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'libraries': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'link_settings': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'sources': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'standalone_static_library': 1,
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'target_name': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'none',
- 'configurations': {
- 'Debug': {
- 'type': [
- ],
- },
- }
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'configurations': {
- 'Debug_Win32': {
- 'msvs_configuration_platform': 'Win32',
- },
- 'Debug_x64': {
- 'msvs_configuration_platform': 'x64',
- },
- },
- },
- 'targets': [
- {
- 'target_name': 'left',
- 'type': 'static_library',
- 'sources': [
- 'left.c',
- ],
- 'configurations': {
- 'Debug_Win32': {
- 'msvs_target_platform': 'x64',
- },
- },
- },
- {
- 'target_name': 'right',
- 'type': 'static_library',
- 'sources': [
- 'right.c',
- ],
- },
- {
- 'target_name': 'front_left',
- 'type': 'executable',
- 'dependencies': ['left'],
- 'sources': [
- 'front.c',
- ],
- 'configurations': {
- 'Debug_Win32': {
- 'msvs_target_platform': 'x64',
- },
- },
- },
- {
- 'target_name': 'front_right',
- 'type': 'executable',
- 'dependencies': ['right'],
- 'sources': [
- 'front.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-const char *message(void);
-
-int main(int argc, char *argv[]) {
- printf("%s\n", message());
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Tests the msvs specific msvs_target_platform option.
-"""
-
-import TestGyp
-import TestCommon
-
-
-def RunX64(exe, stdout):
- try:
- test.run_built_executable(exe, stdout=stdout)
- except WindowsError, e:
- # Assume the exe is 64-bit if it can't load on 32-bit systems.
- # Both versions of the error are required because different versions
- # of python seem to return different errors for invalid exe type.
- if e.errno != 193 and '[Error 193]' not in str(e):
- raise
-
-
-test = TestGyp.TestGyp(formats=['msvs'])
-
-test.run_gyp('configurations.gyp')
-
-test.set_configuration('Debug|x64')
-test.build('configurations.gyp', rebuild=True)
-RunX64('front_left', stdout=('left\n'))
-RunX64('front_right', stdout=('right\n'))
-
-test.set_configuration('Debug|Win32')
-test.build('configurations.gyp', rebuild=True)
-RunX64('front_left', stdout=('left\n'))
-test.run_built_executable('front_right', stdout=('right\n'))
-
-test.pass_test()
+++ /dev/null
-const char *message(void) {
- return "left";
-}
+++ /dev/null
-const char *message(void) {
- return "right";
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[]) {
- if (sizeof(void*) == 4) {
- printf("Running Win32\n");
- } else if (sizeof(void*) == 8) {
- printf("Running x64\n");
- } else {
- printf("Unexpected platform\n");
- }
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'configurations': {
- 'Debug': {
- 'msvs_configuration_platform': 'Win32',
- },
- 'Debug_x64': {
- 'inherit_from': ['Debug'],
- 'msvs_configuration_platform': 'x64',
- },
- },
- },
- 'targets': [
- {
- 'target_name': 'configurations',
- 'type': 'executable',
- 'sources': [
- 'configurations.c',
- ],
- },
- {
- 'target_name': 'configurations64',
- 'type': 'executable',
- 'sources': [
- 'configurations.c',
- ],
- 'configurations': {
- 'Debug': {
- 'msvs_target_platform': 'x64',
- },
- },
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable in three different configurations.
-"""
-
-import TestGyp
-
-import sys
-
-formats = ['msvs']
-if sys.platform == 'win32':
- formats += ['ninja']
-test = TestGyp.TestGyp(formats=formats)
-
-test.run_gyp('configurations.gyp')
-test.set_configuration('Debug|Win32')
-test.build('configurations.gyp', test.ALL)
-
-for machine, suffix in [('14C machine (x86)', ''),
- ('8664 machine (x64)', '64')]:
- output = test.run_dumpbin(
- '/headers', test.built_file_path('configurations%s.exe' % suffix))
- if machine not in output:
- test.fail_test()
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies file copies using an explicit build target of 'all'.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('copies.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('copies.gyp', test.ALL, chdir='relocate/src')
-
-test.must_match(['relocate', 'src', 'copies-out', 'file1'], 'file1 contents\n')
-
-test.built_file_must_match('copies-out/file2',
- 'file2 contents\n',
- chdir='relocate/src')
-
-test.built_file_must_match('copies-out/directory/file3',
- 'file3 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out/directory/file4',
- 'file4 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out/directory/subdir/file5',
- 'file5 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out/subdir/file6',
- 'file6 contents\n',
- chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies file copies using the build tool default.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('copies.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('copies.gyp', chdir='relocate/src')
-
-test.must_match(['relocate', 'src', 'copies-out', 'file1'], 'file1 contents\n')
-
-test.built_file_must_match('copies-out/file2',
- 'file2 contents\n',
- chdir='relocate/src')
-
-test.built_file_must_match('copies-out/directory/file3',
- 'file3 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out/directory/file4',
- 'file4 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out/directory/subdir/file5',
- 'file5 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out/subdir/file6',
- 'file6 contents\n',
- chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies file copies with a trailing slash in the destination directory.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-test.run_gyp('copies-slash.gyp', chdir='src')
-test.relocate('src', 'relocate/src')
-test.build('copies-slash.gyp', chdir='relocate/src')
-
-test.built_file_must_match('copies-out-slash/directory/file3',
- 'file3 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out-slash/directory/file4',
- 'file4 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out-slash/directory/subdir/file5',
- 'file5 contents\n',
- chdir='relocate/src')
-
-test.built_file_must_match('copies-out-slash-2/directory/file3',
- 'file3 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out-slash-2/directory/file4',
- 'file4 contents\n',
- chdir='relocate/src')
-test.built_file_must_match('copies-out-slash-2/directory/subdir/file5',
- 'file5 contents\n',
- chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies file copies where the destination is one level above an expansion that
-yields a make variable.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-test.run_gyp('copies-updir.gyp', chdir='src')
-test.relocate('src', 'relocate/src')
-test.build('copies-updir.gyp', 'copies_up', chdir='relocate/src')
-
-test.built_file_must_match('../copies-out-updir/file1',
- 'file1 contents\n',
- chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # A trailing slash on the destination directory should be ignored.
- {
- 'target_name': 'copies_recursive_trailing_slash',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-out-slash/',
- 'files': [
- 'directory/',
- ],
- },
- ],
- },
- # Even if the source directory is below <(PRODUCT_DIR).
- {
- 'target_name': 'copies_recursive_trailing_slash_in_product_dir',
- 'type': 'none',
- 'dependencies': [ ':copies_recursive_trailing_slash' ],
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-out-slash-2/',
- 'files': [
- '<(PRODUCT_DIR)/copies-out-slash/directory/',
- ],
- },
- ],
- },
- ],
-}
-
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'copies_up',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/../copies-out-updir',
- 'files': [
- 'file1',
- ],
- },
- ],
- },
- ],
-}
-
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'copies1',
- 'type': 'none',
- 'copies': [
- {
- 'destination': 'copies-out',
- 'files': [
- 'file1',
- ],
- },
- ],
- },
- {
- 'target_name': 'copies2',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-out',
- 'files': [
- 'file2',
- ],
- },
- ],
- },
- # Copy a directory tree.
- {
- 'target_name': 'copies_recursive',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-out',
- 'files': [
- 'directory/',
- ],
- },
- ],
- },
- # Copy a directory from deeper in the tree (this should not reproduce the
- # entire directory path in the destination, only the final directory).
- {
- 'target_name': 'copies_recursive_depth',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-out',
- 'files': [
- 'parentdir/subdir/',
- ],
- },
- ],
- },
- # Verify that a null 'files' list doesn't gag the generators.
- {
- 'target_name': 'copies_null',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-null',
- 'files': [],
- },
- ],
- },
- ],
-}
+++ /dev/null
-file3 contents
+++ /dev/null
-file4 contents
+++ /dev/null
-file5 contents
+++ /dev/null
-file1 contents
+++ /dev/null
-file2 contents
+++ /dev/null
-file6 contents
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Test that custom generators can be passed to --format
-"""
-
-import TestGyp
-
-test = TestGyp.TestGypCustom(format='mygenerator.py')
-test.run_gyp('test.gyp')
-
-# mygenerator.py should generate a file called MyBuildFile containing
-# "Testing..." alongside the gyp file.
-test.must_match('MyBuildFile', 'Testing...\n')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Custom gyp generator that doesn't do much."""
-
-import gyp.common
-
-generator_default_variables = {}
-
-def GenerateOutput(target_list, target_dicts, data, params):
- f = open("MyBuildFile", "wb")
- f.write("Testing...\n")
- f.close()
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'exe',
- 'type': 'executable',
- 'sources': [
- 'main.c',
- ],
- },
- ],
-}
+++ /dev/null
-/* Copyright (c) 2010 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef __OPTIMIZE__
- printf("Using an optimization flag\n");
-#else
- printf("Using no optimization flag\n");
-#endif
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'cxxflags',
- 'type': 'executable',
- 'opt': '-Os',
- 'sources': [
- 'cxxflags.cc',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable with C++ define specified by a gyp define, and
-the use of the environment during regeneration when the gyp file changes.
-"""
-
-import os
-import TestGyp
-
-env_stack = []
-
-
-def PushEnv():
- env_copy = os.environ.copy()
- env_stack.append(env_copy)
-
-def PopEnv():
- os.eniron=env_stack.pop()
-
-# Regenerating build files when a gyp file changes is currently only supported
-# by the make and Android generators.
-test = TestGyp.TestGyp(formats=['make', 'android'])
-
-try:
- PushEnv()
- os.environ['CXXFLAGS'] = '-O0'
- test.run_gyp('cxxflags.gyp')
-finally:
- # We clear the environ after calling gyp. When the auto-regeneration happens,
- # the same define should be reused anyway. Reset to empty string first in
- # case the platform doesn't support unsetenv.
- PopEnv()
-
-test.build('cxxflags.gyp')
-
-expect = """\
-Using no optimization flag
-"""
-test.run_built_executable('cxxflags', stdout=expect)
-
-test.sleep()
-
-try:
- PushEnv()
- os.environ['CXXFLAGS'] = '-O2'
- test.run_gyp('cxxflags.gyp')
-finally:
- # We clear the environ after calling gyp. When the auto-regeneration happens,
- # the same define should be reused anyway. Reset to empty string first in
- # case the platform doesn't support unsetenv.
- PopEnv()
-
-test.build('cxxflags.gyp')
-
-expect = """\
-Using an optimization flag
-"""
-test.run_built_executable('cxxflags', stdout=expect)
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2010 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf(TEST_FORMAT, TEST_ARGS);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'defines_escaping',
- 'type': 'executable',
- 'sources': [
- 'defines-escaping.c',
- ],
- 'defines': [
- 'TEST_FORMAT="<(test_format)"',
- 'TEST_ARGS=<(test_args)',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable with C++ define specified by a gyp define using
-various special characters such as quotes, commas, etc.
-"""
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-# Tests string literals, percents, and backslash escapes.
-try:
- os.environ['GYP_DEFINES'] = (
- r"""test_format='\n%s\n' """
- r"""test_args='"Simple test of %s with a literal"'""")
- test.run_gyp('defines-escaping.gyp')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.build('defines-escaping.gyp')
-
-expect = """
-Simple test of %s with a literal
-"""
-test.run_built_executable('defines_escaping', stdout=expect)
-
-
-# Test multiple comma-and-space-separated string literals.
-try:
- os.environ['GYP_DEFINES'] = \
- r"""test_format='\n%s and %s\n' test_args='"foo", "bar"'"""
- test.run_gyp('defines-escaping.gyp')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines-escaping.c')
-test.build('defines-escaping.gyp')
-
-expect = """
-foo and bar
-"""
-test.run_built_executable('defines_escaping', stdout=expect)
-
-
-# Test string literals containing quotes.
-try:
- os.environ['GYP_DEFINES'] = (
- r"""test_format='\n%s %s %s %s %s\n' """
- r"""test_args='"\"These,\"","""
- r""" "\"words,\"","""
- r""" "\"are,\"","""
- r""" "\"in,\"","""
- r""" "\"quotes.\""'""")
- test.run_gyp('defines-escaping.gyp')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines-escaping.c')
-test.build('defines-escaping.gyp')
-
-expect = """
-"These," "words," "are," "in," "quotes."
-"""
-test.run_built_executable('defines_escaping', stdout=expect)
-
-
-# Test string literals containing single quotes.
-try:
- os.environ['GYP_DEFINES'] = (
- r"""test_format='\n%s %s %s %s %s\n' """
- r"""test_args="\"'These,'\","""
- r""" \"'words,'\","""
- r""" \"'are,'\","""
- r""" \"'in,'\","""
- r""" \"'quotes.'\"" """)
- test.run_gyp('defines-escaping.gyp')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines-escaping.c')
-test.build('defines-escaping.gyp')
-
-expect = """
-'These,' 'words,' 'are,' 'in,' 'quotes.'
-"""
-test.run_built_executable('defines_escaping', stdout=expect)
-
-
-# Test string literals containing different numbers of backslashes before quotes
-# (to exercise Windows' quoting behaviour).
-try:
- os.environ['GYP_DEFINES'] = (
- r"""test_format='\n%s\n%s\n%s\n' """
- r"""test_args='"\\\"1 visible slash\\\"","""
- r""" "\\\\\"2 visible slashes\\\\\"","""
- r""" "\\\\\\\"3 visible slashes\\\\\\\""'""")
- test.run_gyp('defines-escaping.gyp')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines-escaping.c')
-test.build('defines-escaping.gyp')
-
-expect = r"""
-\"1 visible slash\"
-\\"2 visible slashes\\"
-\\\"3 visible slashes\\\"
-"""
-test.run_built_executable('defines_escaping', stdout=expect)
-
-
-# Test that various scary sequences are passed unfettered.
-try:
- os.environ['GYP_DEFINES'] = (
- r"""test_format='\n%s\n' """
- r"""test_args='"$foo, " `foo`;"'""")
- test.run_gyp('defines-escaping.gyp')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines-escaping.c')
-test.build('defines-escaping.gyp')
-
-expect = """
-$foo, " `foo`;
-"""
-test.run_built_executable('defines_escaping', stdout=expect)
-
-
-# VisualStudio 2010 can't handle passing %PATH%
-if not (test.format == 'msvs' and test.uses_msbuild):
- try:
- os.environ['GYP_DEFINES'] = (
- """test_format='%s' """
- """test_args='"%PATH%"'""")
- test.run_gyp('defines-escaping.gyp')
- finally:
- del os.environ['GYP_DEFINES']
-
- test.sleep()
- test.touch('defines-escaping.c')
- test.build('defines-escaping.gyp')
-
- expect = "%PATH%"
- test.run_built_executable('defines_escaping', stdout=expect)
-
-
-# Test commas and semi-colons preceded by backslashes (to exercise Windows'
-# quoting behaviour).
-try:
- os.environ['GYP_DEFINES'] = (
- r"""test_format='\n%s\n%s\n' """
- r"""test_args='"\\, \\\\;","""
- # Same thing again, but enclosed in visible quotes.
- r""" "\"\\, \\\\;\""'""")
- test.run_gyp('defines-escaping.gyp')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines-escaping.c')
-test.build('defines-escaping.gyp')
-
-expect = r"""
-\, \\;
-"\, \\;"
-"""
-test.run_built_executable('defines_escaping', stdout=expect)
-
-# We deliberately do not test having an odd number of quotes in a string
-# literal because that isn't feasible in MSVS.
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'value%': '5',
- },
- 'targets': [
- {
- 'target_name': 'defines',
- 'type': 'executable',
- 'sources': [
- 'defines.c',
- ],
- 'defines': [
- 'VALUE=<(value)',
- ],
- },
- ],
-}
-
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef FOO
- printf("FOO is defined\n");
-#endif
- printf("VALUE is %d\n", VALUE);
-
-#ifdef PAREN_VALUE
- printf("2*PAREN_VALUE is %d\n", 2*PAREN_VALUE);
-#endif
-
-#ifdef HASH_VALUE
- printf("HASH_VALUE is %s\n", HASH_VALUE);
-#endif
-
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'defines',
- 'type': 'executable',
- 'sources': [
- 'defines.c',
- ],
- 'defines': [
- 'FOO',
- 'VALUE=1',
- 'PAREN_VALUE=(1+2+3)',
- 'HASH_VALUE="a#1"',
- ],
- },
- ],
- 'conditions': [
- ['OS=="fakeos"', {
- 'targets': [
- {
- 'target_name': 'fakeosprogram',
- 'type': 'executable',
- 'sources': [
- 'defines.c',
- ],
- 'defines': [
- 'FOO',
- 'VALUE=1',
- ],
- },
- ],
- }],
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a default gyp define can be overridden.
-"""
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-# Command-line define
-test.run_gyp('defines.gyp', '-D', 'OS=fakeos')
-test.build('defines.gyp')
-test.built_file_must_exist('fakeosprogram', type=test.EXECUTABLE)
-# Clean up the exe so subsequent tests don't find an old exe.
-os.remove(test.built_file_path('fakeosprogram', type=test.EXECUTABLE))
-
-# Without "OS" override, fokeosprogram shouldn't be built.
-test.run_gyp('defines.gyp')
-test.build('defines.gyp')
-test.built_file_must_not_exist('fakeosprogram', type=test.EXECUTABLE)
-
-# Environment define
-os.environ['GYP_DEFINES'] = 'OS=fakeos'
-test.run_gyp('defines.gyp')
-test.build('defines.gyp')
-test.built_file_must_exist('fakeosprogram', type=test.EXECUTABLE)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable with C++ define specified by a gyp define, and
-the use of the environment during regeneration when the gyp file changes.
-"""
-
-import os
-import TestGyp
-
-# Regenerating build files when a gyp file changes is currently only supported
-# by the make and Android generators.
-test = TestGyp.TestGyp(formats=['make', 'android'])
-
-try:
- os.environ['GYP_DEFINES'] = 'value=50'
- test.run_gyp('defines.gyp')
-finally:
- # We clear the environ after calling gyp. When the auto-regeneration happens,
- # the same define should be reused anyway. Reset to empty string first in
- # case the platform doesn't support unsetenv.
- os.environ['GYP_DEFINES'] = ''
- del os.environ['GYP_DEFINES']
-
-test.build('defines.gyp')
-
-expect = """\
-FOO is defined
-VALUE is 1
-2*PAREN_VALUE is 12
-HASH_VALUE is a#1
-"""
-test.run_built_executable('defines', stdout=expect)
-
-# Sleep so that the changed gyp file will have a newer timestamp than the
-# previously generated build files.
-test.sleep()
-test.write('defines.gyp', test.read('defines-env.gyp'))
-
-test.build('defines.gyp', test.ALL)
-
-expect = """\
-VALUE is 50
-"""
-test.run_built_executable('defines', stdout=expect)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable with C++ define specified by a gyp define.
-"""
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-# With the value only given in environment, it should be used.
-try:
- os.environ['GYP_DEFINES'] = 'value=10'
- test.run_gyp('defines-env.gyp')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.build('defines-env.gyp')
-
-expect = """\
-VALUE is 10
-"""
-test.run_built_executable('defines', stdout=expect)
-
-
-# With the value given in both command line and environment,
-# command line should take precedence.
-try:
- os.environ['GYP_DEFINES'] = 'value=20'
- test.run_gyp('defines-env.gyp', '-Dvalue=25')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines.c')
-test.build('defines-env.gyp')
-
-expect = """\
-VALUE is 25
-"""
-test.run_built_executable('defines', stdout=expect)
-
-
-# With the value only given in environment, it should be ignored if
-# --ignore-environment is specified.
-try:
- os.environ['GYP_DEFINES'] = 'value=30'
- test.run_gyp('defines-env.gyp', '--ignore-environment')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines.c')
-test.build('defines-env.gyp')
-
-expect = """\
-VALUE is 5
-"""
-test.run_built_executable('defines', stdout=expect)
-
-
-# With the value given in both command line and environment, and
-# --ignore-environment also specified, command line should still be used.
-try:
- os.environ['GYP_DEFINES'] = 'value=40'
- test.run_gyp('defines-env.gyp', '--ignore-environment', '-Dvalue=45')
-finally:
- del os.environ['GYP_DEFINES']
-
-test.sleep()
-test.touch('defines.c')
-test.build('defines-env.gyp')
-
-expect = """\
-VALUE is 45
-"""
-test.run_built_executable('defines', stdout=expect)
-
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of an executable with C++ defines.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('defines.gyp')
-
-test.build('defines.gyp')
-
-expect = """\
-FOO is defined
-VALUE is 1
-2*PAREN_VALUE is 12
-HASH_VALUE is a#1
-"""
-test.run_built_executable('defines', stdout=expect)
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-extern int funcB();
-
-int funcA() {
- return funcB();
-}
+++ /dev/null
-int funcB() {
- return 2;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'b',
- 'type': 'static_library',
- 'sources': [
- 'b.c',
- ],
- },
- {
- 'target_name': 'b3',
- 'type': 'static_library',
- 'sources': [
- 'b3.c',
- ],
- },
- ],
-}
+++ /dev/null
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-int funcB() {
- return 3;
-}
+++ /dev/null
-int funcC() {
- return 3
- // Intentional syntax error. This file should never be compiled, so this
- // shouldn't be a problem.
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'c_unused',
- 'type': 'static_library',
- 'sources': [
- 'c.c',
- ],
- },
- {
- 'target_name': 'd',
- 'type': 'static_library',
- 'sources': [
- 'd.c',
- ],
- },
- ],
-}
+++ /dev/null
-int funcD() {
- return 4;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'double_dependency',
- 'type': 'shared_library',
- 'dependencies': [
- 'double_dependent.gyp:double_dependent',
- ],
- 'conditions': [
- ['1==1', {
- 'dependencies': [
- 'double_dependent.gyp:*',
- ],
- }],
- ],
- },
- ],
-}
-
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'double_dependent',
- 'type': 'none',
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'static_library',
- 'sources': [
- 'a.c',
- ],
- # This only depends on the "d" target; other targets in c.gyp
- # should not become part of the build (unlike with 'c/c.gyp:*').
- 'dependencies': ['c/c.gyp:d'],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that pulling in a dependency a second time in a conditional works for
-shared_library targets. Regression test for http://crbug.com/122588
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('double_dependency.gyp')
-
-# If running gyp worked, all is well.
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that dependencies don't pull unused targets into the build.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('extra_targets.gyp')
-
-# This should fail if it tries to build 'c_unused' since 'c/c.c' has a syntax
-# error and won't compile.
-test.build('extra_targets.gyp', test.ALL)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that a link time only dependency will get pulled into the set of built
-targets, even if no executable uses it.
-"""
-
-import TestGyp
-
-import sys
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('lib_only.gyp')
-
-test.build('lib_only.gyp', test.ALL)
-
-test.built_file_must_exist('a', type=test.STATIC_LIB)
-
-# TODO(bradnelson/mark):
-# On linux and windows a library target will at least pull its link dependencies
-# into the generated sln/_main.scons, since not doing so confuses users.
-# This is not currently implemented on mac, which has the opposite behavior.
-if sys.platform == 'darwin':
- if test.format == 'xcode':
- test.built_file_must_not_exist('b', type=test.STATIC_LIB)
- else:
- assert test.format in ('make', 'ninja')
- test.built_file_must_exist('b', type=test.STATIC_LIB)
-else:
- # Make puts the resulting library in a directory matching the input gyp file;
- # for the 'b' library, that is in the 'b' subdirectory.
- test.built_file_must_exist('b', type=test.STATIC_LIB, subdir='b')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that static library dependencies don't traverse none targets, unless
-explicitly specified.
-"""
-
-import TestGyp
-
-import sys
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('none_traversal.gyp')
-
-test.build('none_traversal.gyp', test.ALL)
-
-test.run_built_executable('needs_chain', stdout="2\n")
-test.run_built_executable('doesnt_need_chain', stdout="3\n")
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'static_library',
- 'sources': [
- 'a.c',
- ],
- 'dependencies': ['b/b.gyp:b'],
- },
- ],
-}
+++ /dev/null
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-extern int funcA();
-
-int main() {
- printf("%d\n", funcA());
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'needs_chain',
- 'type': 'executable',
- 'sources': [
- 'a.c',
- 'main.c',
- ],
- 'dependencies': ['chain'],
- },
- {
- 'target_name': 'chain',
- 'type': 'none',
- 'dependencies': ['b/b.gyp:b'],
- },
- {
- 'target_name': 'doesnt_need_chain',
- 'type': 'executable',
- 'sources': [
- 'main.c',
- ],
- 'dependencies': ['no_chain', 'other_chain'],
- },
- {
- 'target_name': 'no_chain',
- 'type': 'none',
- 'sources': [
- ],
- 'dependencies': ['b/b.gyp:b'],
- 'dependencies_traverse': 0,
- },
- {
- 'target_name': 'other_chain',
- 'type': 'static_library',
- 'sources': [
- 'a.c',
- ],
- 'dependencies': ['b/b.gyp:b3'],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies dependencies do the copy step.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('copies.gyp', chdir='src')
-
-test.build('copies.gyp', 'proj2', chdir='src')
-
-test.run_built_executable('proj1',
- chdir='src',
- stdout="Hello from file1.c\n")
-test.run_built_executable('proj2',
- chdir='src',
- stdout="Hello from file2.c\n")
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'proj1',
- 'type': 'executable',
- 'sources': [
- 'file1.c',
- ],
- },
- {
- 'target_name': 'proj2',
- 'type': 'executable',
- 'sources': [
- 'file2.c',
- ],
- 'dependencies': [
- 'proj1',
- ]
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from file1.c\n");
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from file2.c\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'foo',
- 'type': 'static_library',
- 'sources': ['foo.c', 'foo.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- { 'target_name' : 'foo', 'type': 'executable' },
- ],
- 'targets': [
- { 'target_name' : 'bar', 'type': 'executable' },
- ]
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'foo',
- 'type': 'executable',
- 'rules': [
- {
- 'rule_name': 'bar',
- 'extension': '',
- },
- {
- 'rule_name': 'bar',
- 'extension': '',
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'foo'
- },
- {
- 'target_name': 'foo'
- },
- ]
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test that two targets with the same name generates an error.
-"""
-
-import TestGyp
-import TestCmd
-
-# TODO(sbc): Remove the need for match_re below, and make scons
-# error messages consistent with other generators by removing
-# input.py:generator_wants_absolute_build_file_paths.
-
-test = TestGyp.TestGyp()
-
-stderr = ('gyp: Duplicate target definitions for '
- '.*duplicate_targets.gyp:foo#target\n')
-test.run_gyp('duplicate_targets.gyp', status=1, stderr=stderr,
- match=TestCmd.match_re)
-
-stderr = ('gyp: Unable to find targets in build file .*missing_targets.gyp '
- 'while trying to load missing_targets.gyp\n')
-test.run_gyp('missing_targets.gyp', status=1, stderr=stderr,
- match=TestCmd.match_re)
-
-stderr = ('gyp: rule bar exists in duplicate, target '
- '.*duplicate_rule.gyp:foo#target\n')
-test.run_gyp('duplicate_rule.gyp', status=1, stderr=stderr,
- match=TestCmd.match_re)
-
-stderr = ("gyp: Key 'targets' repeated at level 1 with key path '' while "
- "reading .*duplicate_node.gyp while trying to load "
- "duplicate_node.gyp\n")
-test.run_gyp('duplicate_node.gyp', '--check', status=1, stderr=stderr,
- match=TestCmd.match_re)
-
-stderr = 'gyp: Duplicate basenames in sources section, see list above\n'
-test.run_gyp('duplicate_basenames.gyp', status=1, stderr=stderr)
-
-stderr = ("gyp: Dependency '.*missing_dep.gyp:missing.gyp#target' not found "
- "while trying to load target .*missing_dep.gyp:foo#target\n")
-test.run_gyp('missing_dep.gyp', status=1, stderr=stderr,
- match=TestCmd.match_re)
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'foo',
- 'type': 'static_library',
- 'dependencies': [
- 'missing.gyp'
- ]
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- },
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'colon',
- 'type': 'executable',
- 'sources': [
- 'a:b.c',
- ],
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/',
- # MSVS2008 gets confused if the same file is in 'sources' and 'copies'
- 'files': [ 'a:b.c-d', ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Tests that filenames that contain colons are handled correctly.
-(This is important for absolute paths on Windows.)
-"""
-
-import os
-import sys
-import TestGyp
-
-# TODO: Make colons in filenames work with make, if required.
-test = TestGyp.TestGyp(formats=['!make'])
-CHDIR = 'colon'
-
-source_name = 'colon/a:b.c'
-copies_name = 'colon/a:b.c-d'
-if sys.platform == 'win32':
- # Windows uses : as drive separator and doesn't allow it in regular filenames.
- # Use abspath() to create a path that contains a colon instead.
- abs_source = os.path.abspath('colon/file.c')
- test.write('colon/test.gyp',
- test.read('colon/test.gyp').replace("'a:b.c'", repr(abs_source)))
- source_name = abs_source
-
- abs_copies = os.path.abspath('colon/file.txt')
- test.write('colon/test.gyp',
- test.read('colon/test.gyp').replace("'a:b.c-d'", repr(abs_copies)))
- copies_name = abs_copies
-
-# Create the file dynamically, Windows is unhappy if a file with a colon in
-# its name is checked in.
-test.write(source_name, 'int main() {}')
-test.write(copies_name, 'foo')
-
-test.run_gyp('test.gyp', chdir=CHDIR)
-test.build('test.gyp', test.ALL, chdir=CHDIR)
-test.built_file_must_exist(os.path.basename(copies_name), chdir=CHDIR)
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- 'bogus.c',
- 'also/not/real.c',
- 'also/not/real2.c',
- ],
- 'sources!': [
- 'bogus.c',
- 'also/not/real.c',
- 'also/not/real2.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that exclusions (e.g. sources!) are respected. Excluded sources
-that do not exist should not prevent the build from succeeding.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('exclusion.gyp')
-test.build('exclusion.gyp')
-
-# executables
-test.built_file_must_exist('hello' + test._exe, test.EXECUTABLE, bare=True)
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2010 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int func1(void) {
- return 42;
-}
-
-int main(int argc, char *argv[]) {
- printf("Hello, world!\n");
- printf("%d\n", func1());
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that actions can be + a source scanner can be used to implement,
-cross-compiles (for Native Client at this point).
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-# TODO(bradnelson): fix scons.
-if test.format == 'scons':
- test.skip_test()
-
-test.run_gyp('cross.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('cross.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-From test1.cc
-From test2.c
-From test3.cc
-From test4.c
-"""
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
-test.pass_test()
+++ /dev/null
-From bogus1.cc
+++ /dev/null
-From bogus2.c
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': ['cross_compile.gypi'],
- 'target_defaults': {
- 'variables': {
- 'nix_lame%': 0,
- },
- 'target_conditions': [
- ['nix_lame==1', {
- 'sources/': [
- ['exclude', 'lame'],
- ],
- }],
- ],
- },
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'dependencies': [
- 'program_inc',
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'sources': [
- 'program.cc',
- ],
- },
- {
- 'target_name': 'program_inc',
- 'type': 'none',
- 'dependencies': ['cross_program'],
- 'actions': [
- {
- 'action_name': 'program_inc',
- 'inputs': ['<(SHARED_INTERMEDIATE_DIR)/cross_program.fake'],
- 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/cross_program.h'],
- 'action': ['python', 'tochar.py', '<@(_inputs)', '<@(_outputs)'],
- },
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'target_name': 'cross_program',
- 'type': 'none',
- 'variables': {
- 'cross': 1,
- 'nix_lame': 1,
- },
- 'dependencies': ['cross_lib'],
- 'sources': [
- 'test1.cc',
- 'test2.c',
- 'very_lame.cc',
- '<(SHARED_INTERMEDIATE_DIR)/cross_lib.fake',
- ],
- },
- {
- 'target_name': 'cross_lib',
- 'type': 'none',
- 'variables': {
- 'cross': 1,
- 'nix_lame': 1,
- },
- 'sources': [
- 'test3.cc',
- 'test4.c',
- 'bogus1.cc',
- 'bogus2.c',
- 'sort_of_lame.cc',
- ],
- 'sources!': [
- 'bogus1.cc',
- 'bogus2.c',
- ],
- },
- ],
-}
+++ /dev/null
-{
- 'target_defaults': {
- 'variables': {
- 'cross%': 0,
- },
- 'target_conditions': [
- ['cross==1', {
- 'actions': [
- {
- 'action_name': 'cross compile >(_target_name)',
- 'inputs': ['^@(_sources)'],
- 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/>(_target_name).fake'],
- 'action': [
- 'python', 'fake_cross.py', '>@(_outputs)', '^@(_sources)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- }],
- ],
- },
-}
+++ /dev/null
-#!/usr/bin/python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-fh = open(sys.argv[1], 'w')
-
-filenames = sys.argv[2:]
-
-for filename in filenames:
- subfile = open(filename)
- data = subfile.read()
- subfile.close()
- fh.write(data)
-
-fh.close()
+++ /dev/null
-/*
- * Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-static char data[] = {
-#include "cross_program.h"
-};
-
-int main(int argc, char *argv[]) {
- fwrite(data, 1, sizeof(data), stdout);
- return 0;
-}
+++ /dev/null
-From test1.cc
+++ /dev/null
-From test2.c
+++ /dev/null
-From test3.cc
+++ /dev/null
-From test4.c
+++ /dev/null
-#!/usr/bin/python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-src = open(sys.argv[1])
-dst = open(sys.argv[2], 'w')
-for ch in src.read():
- dst.write('%d,\n' % ord(ch))
-src.close()
-dst.close()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'pull_in_all_actions',
- 'type': 'none',
- 'dependencies': [
- 'subdir1/executable.gyp:*',
- 'subdir2/none.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'program.c',
- ],
- 'actions': [
- {
- 'action_name': 'make-prog1',
- 'inputs': [
- 'make-prog1.py',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/prog1.c',
- ],
- 'action': [
- 'python', '<(_inputs)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- {
- 'action_name': 'make-prog2',
- 'inputs': [
- 'make-prog2.py',
- ],
- 'outputs': [
- 'actions-out/prog2.c',
- ],
- 'action': [
- 'python', '<(_inputs)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = r"""
-#include <stdio.h>
-
-void prog1(void)
-{
- printf("Hello from make-prog1.py\n");
-}
-"""
-
-open(sys.argv[1], 'w').write(contents)
-
-sys.exit(0)
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = r"""
-#include <stdio.h>
-
-void prog2(void)
-{
- printf("Hello from make-prog2.py\n");
-}
-"""
-
-open(sys.argv[1], 'w').write(contents)
-
-sys.exit(0)
+++ /dev/null
-#include <stdio.h>\r
-\r
-extern void prog1(void);\r
-extern void prog2(void);\r
-\r
-int main(int argc, char *argv[])\r
-{\r
- printf("Hello from program.c\n");\r
- prog1();\r
- prog2();\r
- return 0;\r
-}\r
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = "Hello from make-file.py\n"
-
-open(sys.argv[1], 'wb').write(contents)
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'file',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'actions': [
- {
- 'action_name': 'make-file',
- 'inputs': [
- 'make-file.py',
- ],
- 'outputs': [
- 'actions-out/file.out',
- # TODO: enhance testing infrastructure to test this
- # without having to hard-code the intermediate dir paths.
- #'<(INTERMEDIATE_DIR)/file.out',
- ],
- 'action': [
- 'python', '<(_inputs)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- }
- ],
- },
- ],
-}
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the
-test script can verify that .xcodeproj files are not created in
-their normal location by making the src/ read-only, and then
-selectively making this build directory writable.
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the
-test script can verify that .xcodeproj files are not created in
-their normal location by making the src/ read-only, and then
-selectively making this build directory writable.
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'pull_in_subdir',
- 'type': 'none',
- 'dependencies': [
- 'subdir/subdir.gyp:*',
- ],
- },
- {
- 'target_name': 'copies1',
- 'type': 'none',
- 'copies': [
- {
- 'destination': 'copies-out',
- 'files': [
- 'file1',
- ],
- },
- ],
- },
- {
- 'target_name': 'copies2',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-out',
- 'files': [
- 'file2',
- ],
- },
- ],
- },
- # Verify that a null 'files' list doesn't gag the generators.
- {
- 'target_name': 'copies_null',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-null',
- 'files': [],
- },
- ],
- },
- ],
-}
+++ /dev/null
-file1 contents
+++ /dev/null
-file2 contents
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the
-test script can verify that .xcodeproj files are not created in
-their normal location by making the src/ read-only, and then
-selectively making this build directory writable.
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the
-test script can verify that .xcodeproj files are not created in
-their normal location by making the src/ read-only, and then
-selectively making this build directory writable.
+++ /dev/null
-file3 contents
+++ /dev/null
-file4 contents
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'copies3',
- 'type': 'none',
- 'copies': [
- {
- 'destination': 'copies-out',
- 'files': [
- 'file3',
- ],
- },
- ],
- },
- {
- 'target_name': 'copies4',
- 'type': 'none',
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/copies-out',
- 'files': [
- 'file4',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies --generator-output= behavior when using actions.
-"""
-
-import TestGyp
-
-# Ninja and Android don't support --generator-output.
-test = TestGyp.TestGyp(formats=['!ninja', '!android'])
-
-# All the generated files should go under 'gypfiles'. The source directory
-# ('actions') should be untouched.
-test.writable(test.workpath('actions'), False)
-test.run_gyp('actions.gyp',
- '--generator-output=' + test.workpath('gypfiles'),
- chdir='actions')
-
-test.writable(test.workpath('actions'), True)
-
-test.relocate('actions', 'relocate/actions')
-test.relocate('gypfiles', 'relocate/gypfiles')
-
-test.writable(test.workpath('relocate/actions'), False)
-
-# Some of the action outputs use "pure" relative paths (i.e. without prefixes
-# like <(INTERMEDIATE_DIR) or <(PROGRAM_DIR)). Even though we are building under
-# 'gypfiles', such outputs will still be created relative to the original .gyp
-# sources. Projects probably wouldn't normally do this, since it kind of defeats
-# the purpose of '--generator-output', but it is supported behaviour.
-test.writable(test.workpath('relocate/actions/build'), True)
-test.writable(test.workpath('relocate/actions/subdir1/build'), True)
-test.writable(test.workpath('relocate/actions/subdir1/actions-out'), True)
-test.writable(test.workpath('relocate/actions/subdir2/build'), True)
-test.writable(test.workpath('relocate/actions/subdir2/actions-out'), True)
-
-test.build('actions.gyp', test.ALL, chdir='relocate/gypfiles')
-
-expect = """\
-Hello from program.c
-Hello from make-prog1.py
-Hello from make-prog2.py
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/actions/subdir1'
-else:
- chdir = 'relocate/gypfiles'
-test.run_built_executable('program', chdir=chdir, stdout=expect)
-
-test.must_match('relocate/actions/subdir2/actions-out/file.out',
- "Hello from make-file.py\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies file copies with --generator-output using an explicit build
-target of 'all'.
-"""
-
-import TestGyp
-
-# Ninja and Android don't support --generator-output.
-test = TestGyp.TestGyp(formats=['!ninja', '!android'])
-
-test.writable(test.workpath('copies'), False)
-
-test.run_gyp('copies.gyp',
- '--generator-output=' + test.workpath('gypfiles'),
- chdir='copies')
-
-test.writable(test.workpath('copies'), True)
-
-test.relocate('copies', 'relocate/copies')
-test.relocate('gypfiles', 'relocate/gypfiles')
-
-test.writable(test.workpath('relocate/copies'), False)
-
-test.writable(test.workpath('relocate/copies/build'), True)
-test.writable(test.workpath('relocate/copies/copies-out'), True)
-test.writable(test.workpath('relocate/copies/subdir/build'), True)
-test.writable(test.workpath('relocate/copies/subdir/copies-out'), True)
-
-test.build('copies.gyp', test.ALL, chdir='relocate/gypfiles')
-
-test.must_match(['relocate', 'copies', 'copies-out', 'file1'],
- "file1 contents\n")
-
-if test.format == 'xcode':
- chdir = 'relocate/copies/build'
-elif test.format == 'make':
- chdir = 'relocate/gypfiles/out'
-else:
- chdir = 'relocate/gypfiles'
-test.must_match([chdir, 'Default', 'copies-out', 'file2'], "file2 contents\n")
-
-test.must_match(['relocate', 'copies', 'subdir', 'copies-out', 'file3'],
- "file3 contents\n")
-
-if test.format == 'xcode':
- chdir = 'relocate/copies/subdir/build'
-elif test.format == 'make':
- chdir = 'relocate/gypfiles/out'
-else:
- chdir = 'relocate/gypfiles'
-test.must_match([chdir, 'Default', 'copies-out', 'file4'], "file4 contents\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies mac bundles work with --generator-output.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- # Ninja doesn't support --generator-output.
- test = TestGyp.TestGyp(formats=['!ninja'])
-
- MAC_BUNDLE_DIR = 'mac-bundle'
- GYPFILES_DIR = 'gypfiles'
- test.writable(test.workpath(MAC_BUNDLE_DIR), False)
- test.run_gyp('test.gyp',
- '--generator-output=' + test.workpath(GYPFILES_DIR),
- chdir=MAC_BUNDLE_DIR)
- test.writable(test.workpath(MAC_BUNDLE_DIR), True)
-
- test.build('test.gyp', test.ALL, chdir=GYPFILES_DIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a project hierarchy created with the --generator-output=
-option can be built even when it's relocated to a different path.
-"""
-
-import TestGyp
-
-# Ninja and Android don't support --generator-output.
-test = TestGyp.TestGyp(formats=['!ninja', '!android'])
-
-test.writable(test.workpath('src'), False)
-
-test.run_gyp('prog1.gyp',
- '-Dset_symroot=1',
- '--generator-output=' + test.workpath('gypfiles'),
- chdir='src')
-
-test.writable(test.workpath('src'), True)
-
-test.relocate('src', 'relocate/src')
-test.relocate('gypfiles', 'relocate/gypfiles')
-
-test.writable(test.workpath('relocate/src'), False)
-
-test.writable(test.workpath('relocate/src/build'), True)
-test.writable(test.workpath('relocate/src/subdir2/build'), True)
-test.writable(test.workpath('relocate/src/subdir3/build'), True)
-
-test.build('prog1.gyp', test.ALL, chdir='relocate/gypfiles')
-
-chdir = 'relocate/gypfiles'
-
-expect = """\
-Hello from %s
-Hello from inc.h
-Hello from inc1/include1.h
-Hello from inc2/include2.h
-Hello from inc3/include3.h
-Hello from subdir2/deeper/deeper.h
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/src'
-test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir2'
-test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir3'
-test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies --generator-output= behavior when using rules.
-"""
-
-import TestGyp
-
-# Ninja and Android don't support --generator-output.
-test = TestGyp.TestGyp(formats=['!ninja', '!android'])
-
-test.writable(test.workpath('rules'), False)
-
-test.run_gyp('rules.gyp',
- '--generator-output=' + test.workpath('gypfiles'),
- chdir='rules')
-
-test.writable(test.workpath('rules'), True)
-
-test.relocate('rules', 'relocate/rules')
-test.relocate('gypfiles', 'relocate/gypfiles')
-
-test.writable(test.workpath('relocate/rules'), False)
-
-test.writable(test.workpath('relocate/rules/build'), True)
-test.writable(test.workpath('relocate/rules/subdir1/build'), True)
-test.writable(test.workpath('relocate/rules/subdir2/build'), True)
-test.writable(test.workpath('relocate/rules/subdir2/rules-out'), True)
-
-test.build('rules.gyp', test.ALL, chdir='relocate/gypfiles')
-
-expect = """\
-Hello from program.c
-Hello from function1.in1
-Hello from function2.in1
-Hello from define3.in0
-Hello from define4.in0
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/rules/subdir1'
-else:
- chdir = 'relocate/gypfiles'
-test.run_built_executable('program', chdir=chdir, stdout=expect)
-
-test.must_match('relocate/rules/subdir2/rules-out/file1.out',
- "Hello from file1.in0\n")
-test.must_match('relocate/rules/subdir2/rules-out/file2.out',
- "Hello from file2.in0\n")
-test.must_match('relocate/rules/subdir2/rules-out/file3.out',
- "Hello from file3.in1\n")
-test.must_match('relocate/rules/subdir2/rules-out/file4.out',
- "Hello from file4.in1\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a target from a .gyp file a few subdirectories
-deep when the --generator-output= option is used to put the build
-configuration files in a separate directory tree.
-"""
-
-import TestGyp
-
-# Ninja and Android don't support --generator-output.
-test = TestGyp.TestGyp(formats=['!ninja', '!android'])
-
-test.writable(test.workpath('src'), False)
-
-test.writable(test.workpath('src/subdir2/deeper/build'), True)
-
-test.run_gyp('deeper.gyp',
- '-Dset_symroot=1',
- '--generator-output=' + test.workpath('gypfiles'),
- chdir='src/subdir2/deeper')
-
-test.build('deeper.gyp', test.ALL, chdir='gypfiles')
-
-chdir = 'gypfiles'
-
-if test.format == 'xcode':
- chdir = 'src/subdir2/deeper'
-test.run_built_executable('deeper',
- chdir=chdir,
- stdout="Hello from deeper.c\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a project hierarchy created when the --generator-output=
-option is used to put the build configuration files in a separate
-directory tree.
-"""
-
-import TestGyp
-
-# Ninja and Android don't support --generator-output.
-test = TestGyp.TestGyp(formats=['!ninja', '!android'])
-
-test.writable(test.workpath('src'), False)
-
-test.run_gyp('prog1.gyp',
- '-Dset_symroot=1',
- '--generator-output=' + test.workpath('gypfiles'),
- chdir='src')
-
-test.writable(test.workpath('src/build'), True)
-test.writable(test.workpath('src/subdir2/build'), True)
-test.writable(test.workpath('src/subdir3/build'), True)
-
-test.build('prog1.gyp', test.ALL, chdir='gypfiles')
-
-chdir = 'gypfiles'
-
-expect = """\
-Hello from %s
-Hello from inc.h
-Hello from inc1/include1.h
-Hello from inc2/include2.h
-Hello from inc3/include3.h
-Hello from subdir2/deeper/deeper.h
-"""
-
-if test.format == 'xcode':
- chdir = 'src'
-test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
-
-if test.format == 'xcode':
- chdir = 'src/subdir2'
-test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
-
-if test.format == 'xcode':
- chdir = 'src/subdir3'
-test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
-
-test.pass_test()
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.google.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>ause</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
+++ /dev/null
-int main() {}
+++ /dev/null
-A text file.
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_app',
- 'product_name': 'Test App Gyp',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [
- 'main.c',
- ],
- 'mac_bundle_resources': [
- 'resource.sb',
- ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- 'ORDER_FILE': 'app.order',
- 'GCC_PREFIX_HEADER': 'header.h',
- 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
- },
- },
- ],
-}
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-contents = open(sys.argv[1], 'r').read()
-open(sys.argv[2], 'wb').write(contents)
-
-sys.exit(0)
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'pull_in_all_actions',
- 'type': 'none',
- 'dependencies': [
- 'subdir1/executable.gyp:*',
- 'subdir2/none.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-#define STRING3 "Hello from define3.in0\n"
+++ /dev/null
-#define STRING4 "Hello from define4.in0\n"
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'program.c',
- 'function1.in1',
- 'function2.in1',
- 'define3.in0',
- 'define4.in0',
- ],
- 'include_dirs': [
- '<(INTERMEDIATE_DIR)',
- ],
- 'rules': [
- {
- 'rule_name': 'copy_file_0',
- 'extension': 'in0',
- 'inputs': [
- '../copy-file.py',
- ],
- 'outputs': [
- # TODO: fix SCons and Make to support generated files not
- # in a variable-named path like <(INTERMEDIATE_DIR)
- #'<(RULE_INPUT_ROOT).c',
- '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).h',
- ],
- 'action': [
- 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 0,
- },
- {
- 'rule_name': 'copy_file_1',
- 'extension': 'in1',
- 'inputs': [
- '../copy-file.py',
- ],
- 'outputs': [
- # TODO: fix SCons and Make to support generated files not
- # in a variable-named path like <(INTERMEDIATE_DIR)
- #'<(RULE_INPUT_ROOT).c',
- '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c',
- ],
- 'action': [
- 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-void function1(void)
-{
- printf("Hello from function1.in1\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-void function2(void)
-{
- printf("Hello from function2.in1\n");
-}
+++ /dev/null
-#include <stdio.h>
-#include "define3.h"
-#include "define4.h"
-
-extern void function1(void);
-extern void function2(void);
-extern void function3(void);
-extern void function4(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from program.c\n");
- function1();
- function2();
- printf("%s", STRING3);
- printf("%s", STRING4);
- return 0;
-}
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-Hello from file1.in0
+++ /dev/null
-Hello from file2.in0
+++ /dev/null
-Hello from file3.in1
+++ /dev/null
-Hello from file4.in1
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'files',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'file1.in0',
- 'file2.in0',
- 'file3.in1',
- 'file4.in1',
- ],
- 'rules': [
- {
- 'rule_name': 'copy_file_0',
- 'extension': 'in0',
- 'inputs': [
- '../copy-file.py',
- ],
- 'outputs': [
- 'rules-out/<(RULE_INPUT_ROOT).out',
- ],
- 'action': [
- 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 0,
- },
- {
- 'rule_name': 'copy_file_1',
- 'extension': 'in1',
- 'inputs': [
- '../copy-file.py',
- ],
- 'outputs': [
- 'rules-out/<(RULE_INPUT_ROOT).out',
- ],
- 'action': [
- 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the\r
-test script can verify that .xcodeproj files are not created in\r
-their normal location by making the src/ read-only, and then\r
-selectively making this build directory writable.\r
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the
-test script can verify that .xcodeproj files are not created in
-their normal location by making the src/ read-only, and then
-selectively making this build directory writable.
+++ /dev/null
-#define INC_STRING "inc.h"
+++ /dev/null
-#define INCLUDE1_STRING "inc1/include1.h"
+++ /dev/null
-#include <stdio.h>
-
-#include "inc.h"
-#include "include1.h"
-#include "include2.h"
-#include "include3.h"
-#include "deeper.h"
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog1.c\n");
- printf("Hello from %s\n", INC_STRING);
- printf("Hello from %s\n", INCLUDE1_STRING);
- printf("Hello from %s\n", INCLUDE2_STRING);
- printf("Hello from %s\n", INCLUDE3_STRING);
- printf("Hello from %s\n", DEEPER_STRING);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- 'symroot.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog1',
- 'type': 'executable',
- 'dependencies': [
- 'subdir2/prog2.gyp:prog2',
- ],
- 'include_dirs': [
- '.',
- 'inc1',
- 'subdir2/inc2',
- 'subdir3/inc3',
- 'subdir2/deeper',
- ],
- 'sources': [
- 'prog1.c',
- ],
- },
- ],
-}
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the
-test script can verify that .xcodeproj files are not created in
-their normal location by making the src/ read-only, and then
-selectively making this build directory writable.
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the
-test script can verify that .xcodeproj files are not created in
-their normal location by making the src/ read-only, and then
-selectively making this build directory writable.
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from deeper.c\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../../symroot.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'deeper',
- 'type': 'executable',
- 'sources': [
- 'deeper.c',
- ],
- },
- ],
-}
+++ /dev/null
-#define DEEPER_STRING "subdir2/deeper/deeper.h"
+++ /dev/null
-#define INCLUDE2_STRING "inc2/include2.h"
+++ /dev/null
-#include <stdio.h>
-
-#include "inc.h"
-#include "include1.h"
-#include "include2.h"
-#include "include3.h"
-#include "deeper.h"
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog2.c\n");
- printf("Hello from %s\n", INC_STRING);
- printf("Hello from %s\n", INCLUDE1_STRING);
- printf("Hello from %s\n", INCLUDE2_STRING);
- printf("Hello from %s\n", INCLUDE3_STRING);
- printf("Hello from %s\n", DEEPER_STRING);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../symroot.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog2',
- 'type': 'executable',
- 'include_dirs': [
- '..',
- '../inc1',
- 'inc2',
- '../subdir3/inc3',
- 'deeper',
- ],
- 'dependencies': [
- '../subdir3/prog3.gyp:prog3',
- ],
- 'sources': [
- 'prog2.c',
- ],
- },
- ],
-}
+++ /dev/null
-A place-holder for this Xcode build output directory, so that the
-test script can verify that .xcodeproj files are not created in
-their normal location by making the src/ read-only, and then
-selectively making this build directory writable.
+++ /dev/null
-#define INCLUDE3_STRING "inc3/include3.h"
+++ /dev/null
-#include <stdio.h>
-
-#include "inc.h"
-#include "include1.h"
-#include "include2.h"
-#include "include3.h"
-#include "deeper.h"
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog3.c\n");
- printf("Hello from %s\n", INC_STRING);
- printf("Hello from %s\n", INCLUDE1_STRING);
- printf("Hello from %s\n", INCLUDE2_STRING);
- printf("Hello from %s\n", INCLUDE3_STRING);
- printf("Hello from %s\n", DEEPER_STRING);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../symroot.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog3',
- 'type': 'executable',
- 'include_dirs': [
- '..',
- '../inc1',
- '../subdir2/inc2',
- 'inc3',
- '../subdir2/deeper',
- ],
- 'sources': [
- 'prog3.c',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'set_symroot%': 0,
- },
- 'conditions': [
- ['set_symroot == 1', {
- 'xcode_settings': {
- 'SYMROOT': '<(DEPTH)/build',
- },
- }],
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_target',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'test_action',
- 'inputs': [],
- 'outputs': [ 'action.txt' ],
- 'action': [
- 'python',
- 'echo.py',
- '<(key)',
- '<(_outputs)',
- ],
- 'msvs_cygwin_shell': 0,
- }
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-f = open(sys.argv[2], 'w+')
-f.write(sys.argv[1])
-f.close()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that when multiple values are supplied for a gyp define, the last one
-is used.
-"""
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-os.environ['GYP_DEFINES'] = 'key=value1 key=value2 key=value3'
-test.run_gyp('defines.gyp')
-test.build('defines.gyp')
-test.must_contain('action.txt', 'value3')
-
-# The last occurrence of a repeated set should take precedence over other
-# values.
-os.environ['GYP_DEFINES'] = 'key=repeated_value key=value1 key=repeated_value'
-test.run_gyp('defines.gyp')
-if test.format == 'msvs' and not test.uses_msbuild:
- # msvs versions before 2010 don't detect build rule changes not reflected
- # in file system timestamps. Rebuild to see differences.
- test.build('defines.gyp', rebuild=True)
-else:
- test.build('defines.gyp')
-test.must_contain('action.txt', 'repeated_value')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that when the same value is repeated for a gyp define, duplicates are
-stripped from the regeneration rule.
-"""
-
-import os
-import TestGyp
-
-# Regenerating build files when a gyp file changes is currently only supported
-# by the make and Android generators.
-test = TestGyp.TestGyp(formats=['make', 'android'])
-
-os.environ['GYP_DEFINES'] = 'key=repeated_value key=value1 key=repeated_value'
-test.run_gyp('defines.gyp')
-test.build('defines.gyp')
-
-# The last occurrence of a repeated set should take precedence over other
-# values. See gyptest-multiple-values.py.
-test.must_contain('action.txt', 'repeated_value')
-
-# So the regeneration rule needs to use the correct order.
-test.must_not_contain(
- 'Makefile', '"-Dkey=repeated_value" "-Dkey=value1" "-Dkey=repeated_value"')
-test.must_contain('Makefile', '"-Dkey=value1" "-Dkey=repeated_value"')
-
-# Sleep so that the changed gyp file will have a newer timestamp than the
-# previously generated build files.
-test.sleep()
-os.utime("defines.gyp", None)
-
-test.build('defines.gyp')
-test.must_contain('action.txt', 'repeated_value')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that a hard_dependency that is exported is pulled in as a dependency
-for a target if the target is a static library and if the generator will
-remove dependencies between static libraries.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-if test.format == 'dump_dependency_json':
- test.skip_test('Skipping test; dependency JSON does not adjust ' \
- 'static libraries.\n')
-
-test.run_gyp('hard_dependency.gyp', chdir='src')
-
-chdir = 'relocate/src'
-test.relocate('src', chdir)
-
-test.build('hard_dependency.gyp', 'c', chdir=chdir)
-
-# The 'a' static library should be built, as it has actions with side-effects
-# that are necessary to compile 'c'. Even though 'c' does not directly depend
-# on 'a', because 'a' is a hard_dependency that 'b' exports, 'c' should import
-# it as a hard_dependency and ensure it is built before building 'c'.
-test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_not_exist('b', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_exist('c', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_not_exist('d', type=test.STATIC_LIB, chdir=chdir)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that a hard_dependency that is not exported is not pulled in as a
-dependency for a target if the target does not explicitly specify a dependency
-and none of its dependencies export the hard_dependency.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-if test.format == 'dump_dependency_json':
- test.skip_test('Skipping test; dependency JSON does not adjust ' \
- 'static libaries.\n')
-
-test.run_gyp('hard_dependency.gyp', chdir='src')
-
-chdir = 'relocate/src'
-test.relocate('src', chdir)
-
-test.build('hard_dependency.gyp', 'd', chdir=chdir)
-
-# Because 'c' does not export a hard_dependency, only the target 'd' should
-# be built. This is because the 'd' target does not need the generated headers
-# in order to be compiled.
-test.built_file_must_not_exist('a', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_not_exist('b', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_not_exist('c', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_exist('d', type=test.STATIC_LIB, chdir=chdir)
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include "a.h"
-
-int funcA() {
- return 42;
-}
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#ifndef A_H_
-#define A_H_
-
-#include "generated.h"
-
-int funcA();
-
-#endif // A_H_
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include "a.h"
-
-int funcB() {
- return funcA();
-}
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#ifndef B_H_
-#define B_H_
-
-#include "a.h"
-
-int funcB();
-
-#endif // B_H_
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include "b.h"
-#include "c.h"
-
-int funcC() {
- return funcB();
-}
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#ifndef C_H_
-#define C_H_
-
-int funcC();
-
-#endif // C_H_
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include "c.h"
-
-int funcD() {
- return funcC();
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-f = open(sys.argv[1], 'wb')
-f.write('/* Hello World */\n')
-f.close()
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'static_library',
- 'sources': [
- 'a.c',
- 'a.h',
- ],
- 'hard_dependency': 1,
- 'actions': [
- {
- 'action_name': 'generate_headers',
- 'inputs': [
- 'emit.py'
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/generated.h'
- ],
- 'action': [
- 'python',
- 'emit.py',
- '<(SHARED_INTERMEDIATE_DIR)/generated.h',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- },
- },
- {
- 'target_name': 'b',
- 'type': 'static_library',
- 'sources': [
- 'b.c',
- 'b.h',
- ],
- 'dependencies': [
- 'a',
- ],
- 'export_dependent_settings': [
- 'a',
- ],
- },
- {
- 'target_name': 'c',
- 'type': 'static_library',
- 'sources': [
- 'c.c',
- 'c.h',
- ],
- 'dependencies': [
- 'b',
- ],
- },
- {
- 'target_name': 'd',
- 'type': 'static_library',
- 'sources': [
- 'd.c',
- ],
- 'dependencies': [
- 'c',
- ],
- }
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simplest-possible build of a "Hello, world!" program
-using an explicit build target of 'all'.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_all')
-
-test.run_gyp('hello.gyp')
-
-test.build('hello.gyp', test.ALL)
-
-test.run_built_executable('hello', stdout="Hello, world!\n")
-
-test.up_to_date('hello.gyp', test.ALL)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simplest-possible build of a "Hello, world!" program
-using the default build target.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_default')
-
-test.run_gyp('hello.gyp')
-
-test.build('hello.gyp')
-
-test.run_built_executable('hello', stdout="Hello, world!\n")
-
-test.up_to_date('hello.gyp', test.DEFAULT)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that Makefiles don't get rebuilt when a source gyp file changes and
-the disable_regeneration generator flag is set.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('hello.gyp', '-Gauto_regeneration=0')
-
-test.build('hello.gyp', test.ALL)
-
-test.run_built_executable('hello', stdout="Hello, world!\n")
-
-# Sleep so that the changed gyp file will have a newer timestamp than the
-# previously generated build files.
-test.sleep()
-test.write('hello.gyp', test.read('hello2.gyp'))
-
-test.build('hello.gyp', test.ALL)
-
-# Should still be the old executable, as regeneration was disabled.
-test.run_built_executable('hello', stdout="Hello, world!\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that Makefiles get rebuilt when a source gyp file changes.
-"""
-
-import TestGyp
-
-# Regenerating build files when a gyp file changes is currently only supported
-# by the make and Android generators.
-test = TestGyp.TestGyp(formats=['make', 'android'])
-
-test.run_gyp('hello.gyp')
-
-test.build('hello.gyp', test.ALL)
-
-test.run_built_executable('hello', stdout="Hello, world!\n")
-
-# Sleep so that the changed gyp file will have a newer timestamp than the
-# previously generated build files.
-test.sleep()
-test.write('hello.gyp', test.read('hello2.gyp'))
-
-test.build('hello.gyp', test.ALL)
-
-test.run_built_executable('hello', stdout="Hello, two!\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simplest-possible build of a "Hello, world!" program
-using an explicit build target of 'hello'.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_target')
-
-test.run_gyp('hello.gyp')
-
-test.build('hello.gyp', 'hello')
-
-test.run_built_executable('hello', stdout="Hello, world!\n")
-
-test.up_to_date('hello.gyp', 'hello')
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello, world!\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- },
- ],
-}
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello, two!\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello2.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies inclusion of $HOME/.gyp/include.gypi works properly with relocation
-and with regeneration.
-"""
-
-import os
-import TestGyp
-
-# Regenerating build files when a gyp file changes is currently only supported
-# by the make and Android generators.
-test = TestGyp.TestGyp(formats=['make', 'android'])
-
-os.environ['HOME'] = os.path.abspath('home')
-
-test.run_gyp('all.gyp', chdir='src')
-
-# After relocating, we should still be able to build (build file shouldn't
-# contain relative reference to ~/.gyp/include.gypi)
-test.relocate('src', 'relocate/src')
-
-test.build('all.gyp', test.ALL, chdir='relocate/src')
-
-test.run_built_executable('printfoo',
- chdir='relocate/src',
- stdout='FOO is fromhome\n')
-
-# Building should notice any changes to ~/.gyp/include.gypi and regyp.
-test.sleep()
-
-test.write('home/.gyp/include.gypi', test.read('home2/.gyp/include.gypi'))
-
-test.build('all.gyp', test.ALL, chdir='relocate/src')
-
-test.run_built_executable('printfoo',
- chdir='relocate/src',
- stdout='FOO is fromhome2\n')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies inclusion of $HOME/.gyp/include.gypi works.
-"""
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-os.environ['HOME'] = os.path.abspath('home')
-
-test.run_gyp('all.gyp', chdir='src')
-
-# After relocating, we should still be able to build (build file shouldn't
-# contain relative reference to ~/.gyp/include.gypi)
-test.relocate('src', 'relocate/src')
-
-test.build('all.gyp', test.ALL, chdir='relocate/src')
-
-test.run_built_executable('printfoo',
- chdir='relocate/src',
- stdout='FOO is fromhome\n')
-
-test.pass_test()
+++ /dev/null
-{
- 'variables': {
- 'foo': '"fromhome"',
- },
-}
+++ /dev/null
-{
- 'variables': {
- 'foo': '"fromhome2"',
- },
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'foo%': '"fromdefault"',
- },
- 'targets': [
- {
- 'target_name': 'printfoo',
- 'type': 'executable',
- 'sources': [
- 'printfoo.c',
- ],
- 'defines': [
- 'FOO=<(foo)',
- ],
- },
- ],
-}
-
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("FOO is %s\n", FOO);
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies use of include_dirs when using an explicit build target of 'all'.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-if test.format == 'scons':
- test.skip_test('TODO: http://code.google.com/p/gyp/issues/detail?id=176\n')
-
-test.run_gyp('includes.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('includes.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from includes.c
-Hello from inc.h
-Hello from include1.h
-Hello from subdir/inc2/include2.h
-Hello from shadow2/shadow.h
-"""
-test.run_built_executable('includes', stdout=expect, chdir='relocate/src')
-
-if test.format == 'xcode':
- chdir='relocate/src/subdir'
-else:
- chdir='relocate/src'
-
-expect = """\
-Hello from subdir/subdir_includes.c
-Hello from subdir/inc.h
-Hello from include1.h
-Hello from subdir/inc2/include2.h
-"""
-test.run_built_executable('subdir_includes', stdout=expect, chdir=chdir)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies use of include_dirs when using the default build target.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-if test.format == 'scons':
- test.skip_test('TODO: http://code.google.com/p/gyp/issues/detail?id=176\n')
-
-test.run_gyp('includes.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('includes.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from includes.c
-Hello from inc.h
-Hello from include1.h
-Hello from subdir/inc2/include2.h
-Hello from shadow2/shadow.h
-"""
-test.run_built_executable('includes', stdout=expect, chdir='relocate/src')
-
-if test.format == 'xcode':
- chdir='relocate/src/subdir'
-else:
- chdir='relocate/src'
-
-expect = """\
-Hello from subdir/subdir_includes.c
-Hello from subdir/inc.h
-Hello from include1.h
-Hello from subdir/inc2/include2.h
-"""
-test.run_built_executable('subdir_includes', stdout=expect, chdir=chdir)
-
-test.pass_test()
+++ /dev/null
-#define INC_STRING "inc.h"
+++ /dev/null
-#define INCLUDE1_STRING "include1.h"
+++ /dev/null
-#include <stdio.h>
-
-#include "inc.h"
-#include "include1.h"
-#include "include2.h"
-#include "shadow.h"
-
-int main(int argc, char *argv[])
-{
- printf("Hello from includes.c\n");
- printf("Hello from %s\n", INC_STRING);
- printf("Hello from %s\n", INCLUDE1_STRING);
- printf("Hello from %s\n", INCLUDE2_STRING);
- /* Test that include_dirs happen first: The gyp file has a -Ishadow1
- cflag and an include_dir of shadow2. Including shadow.h should get
- the shadow.h from the include_dir. */
- printf("Hello from %s\n", SHADOW_STRING);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'includes',
- 'type': 'executable',
- 'dependencies': [
- 'subdir/subdir_includes.gyp:subdir_includes',
- ],
- 'cflags': [
- '-Ishadow1',
- ],
- 'include_dirs': [
- '.',
- 'inc1',
- 'shadow2',
- 'subdir/inc2',
- ],
- 'sources': [
- 'includes.c',
- ],
- },
- ],
-}
+++ /dev/null
-#define SHADOW_STRING "shadow1/shadow.h"
+++ /dev/null
-#define SHADOW_STRING "shadow2/shadow.h"
+++ /dev/null
-#define INC_STRING "subdir/inc.h"
+++ /dev/null
-#define INCLUDE2_STRING "subdir/inc2/include2.h"
+++ /dev/null
-#include <stdio.h>
-
-#include "inc.h"
-#include "include1.h"
-#include "include2.h"
-
-int main(int argc, char *argv[])
-{
- printf("Hello from subdir/subdir_includes.c\n");
- printf("Hello from %s\n", INC_STRING);
- printf("Hello from %s\n", INCLUDE1_STRING);
- printf("Hello from %s\n", INCLUDE2_STRING);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'subdir_includes',
- 'type': 'executable',
- 'include_dirs': [
- '.',
- '../inc1',
- 'inc2',
- ],
- 'sources': [
- 'subdir_includes.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that targets have independent INTERMEDIATE_DIRs.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('test.gyp', chdir='src')
-test.build('test.gyp', 'target1', chdir='src')
-# Check stuff exists.
-intermediate_file1 = test.read('src/outfile.txt')
-test.must_contain(intermediate_file1, 'target1')
-
-shared_intermediate_file1 = test.read('src/shared_outfile.txt')
-test.must_contain(shared_intermediate_file1, 'shared_target1')
-
-test.run_gyp('test2.gyp', chdir='src')
-# Force the shared intermediate to be rebuilt.
-test.sleep()
-test.touch('src/shared_infile.txt')
-test.build('test2.gyp', 'target2', chdir='src')
-# Check INTERMEDIATE_DIR file didn't get overwritten but SHARED_INTERMEDIATE_DIR
-# file did.
-intermediate_file2 = test.read('src/outfile.txt')
-test.must_contain(intermediate_file1, 'target1')
-test.must_contain(intermediate_file2, 'target2')
-
-shared_intermediate_file2 = test.read('src/shared_outfile.txt')
-if shared_intermediate_file1 != shared_intermediate_file2:
- test.fail_test(shared_intermediate_file1 + ' != ' + shared_intermediate_file2)
-
-test.must_contain(shared_intermediate_file1, 'shared_target2')
-test.must_contain(shared_intermediate_file2, 'shared_target2')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Takes 3 arguments. Writes the 1st argument to the file in the 2nd argument,
-# and writes the absolute path to the file in the 2nd argument to the file in
-# the 3rd argument.
-
-import os
-import shlex
-import sys
-
-if len(sys.argv) == 3 and ' ' in sys.argv[2]:
- sys.argv[2], fourth = shlex.split(sys.argv[2].replace('\\', '\\\\'))
- sys.argv.append(fourth)
-
-#print >>sys.stderr, sys.argv
-
-with open(sys.argv[2], 'w') as f:
- f.write(sys.argv[1])
-
-with open(sys.argv[3], 'w') as f:
- f.write(os.path.abspath(sys.argv[2]))
+++ /dev/null
-dummy input
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'target1',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'intermediate',
- 'inputs': [],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/intermediate_out.txt',
- 'outfile.txt',
- ],
- 'action': [
- 'python', 'script.py', 'target1', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'shared_intermediate',
- 'inputs': [
- 'shared_infile.txt',
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/intermediate_out.txt',
- 'shared_outfile.txt',
- ],
- 'action': [
- 'python', 'script.py', 'shared_target1', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'target2',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'intermediate',
- 'inputs': [],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/intermediate_out.txt',
- 'outfile.txt',
- ],
- 'action': [
- 'python', 'script.py', 'target2', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- {
- 'action_name': 'shared_intermediate',
- 'inputs': [
- 'shared_infile.txt',
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/intermediate_out.txt',
- 'shared_outfile.txt',
- ],
- 'action': [
- 'python', 'script.py', 'shared_target2', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-Supporting modules for GYP testing.
-
- TestCmd.py
- TestCommon.py
-
- Modules for generic testing of command-line utilities,
- specifically including the ability to copy a test configuration
- to temporary directories (with default cleanup on exit) as part
- of running test scripts that invoke commands, compare actual
- against expected output, etc.
-
- Our copies of these come from the SCons project,
- http://www.scons.org/.
-
- TestGyp.py
-
- Modules for GYP-specific tests, of course.
+++ /dev/null
-"""
-TestCmd.py: a testing framework for commands and scripts.
-
-The TestCmd module provides a framework for portable automated testing
-of executable commands and scripts (in any language, not just Python),
-especially commands and scripts that require file system interaction.
-
-In addition to running tests and evaluating conditions, the TestCmd
-module manages and cleans up one or more temporary workspace
-directories, and provides methods for creating files and directories in
-those workspace directories from in-line data, here-documents), allowing
-tests to be completely self-contained.
-
-A TestCmd environment object is created via the usual invocation:
-
- import TestCmd
- test = TestCmd.TestCmd()
-
-There are a bunch of keyword arguments available at instantiation:
-
- test = TestCmd.TestCmd(description = 'string',
- program = 'program_or_script_to_test',
- interpreter = 'script_interpreter',
- workdir = 'prefix',
- subdir = 'subdir',
- verbose = Boolean,
- match = default_match_function,
- diff = default_diff_function,
- combine = Boolean)
-
-There are a bunch of methods that let you do different things:
-
- test.verbose_set(1)
-
- test.description_set('string')
-
- test.program_set('program_or_script_to_test')
-
- test.interpreter_set('script_interpreter')
- test.interpreter_set(['script_interpreter', 'arg'])
-
- test.workdir_set('prefix')
- test.workdir_set('')
-
- test.workpath('file')
- test.workpath('subdir', 'file')
-
- test.subdir('subdir', ...)
-
- test.rmdir('subdir', ...)
-
- test.write('file', "contents\n")
- test.write(['subdir', 'file'], "contents\n")
-
- test.read('file')
- test.read(['subdir', 'file'])
- test.read('file', mode)
- test.read(['subdir', 'file'], mode)
-
- test.writable('dir', 1)
- test.writable('dir', None)
-
- test.preserve(condition, ...)
-
- test.cleanup(condition)
-
- test.command_args(program = 'program_or_script_to_run',
- interpreter = 'script_interpreter',
- arguments = 'arguments to pass to program')
-
- test.run(program = 'program_or_script_to_run',
- interpreter = 'script_interpreter',
- arguments = 'arguments to pass to program',
- chdir = 'directory_to_chdir_to',
- stdin = 'input to feed to the program\n')
- universal_newlines = True)
-
- p = test.start(program = 'program_or_script_to_run',
- interpreter = 'script_interpreter',
- arguments = 'arguments to pass to program',
- universal_newlines = None)
-
- test.finish(self, p)
-
- test.pass_test()
- test.pass_test(condition)
- test.pass_test(condition, function)
-
- test.fail_test()
- test.fail_test(condition)
- test.fail_test(condition, function)
- test.fail_test(condition, function, skip)
-
- test.no_result()
- test.no_result(condition)
- test.no_result(condition, function)
- test.no_result(condition, function, skip)
-
- test.stdout()
- test.stdout(run)
-
- test.stderr()
- test.stderr(run)
-
- test.symlink(target, link)
-
- test.banner(string)
- test.banner(string, width)
-
- test.diff(actual, expected)
-
- test.match(actual, expected)
-
- test.match_exact("actual 1\nactual 2\n", "expected 1\nexpected 2\n")
- test.match_exact(["actual 1\n", "actual 2\n"],
- ["expected 1\n", "expected 2\n"])
-
- test.match_re("actual 1\nactual 2\n", regex_string)
- test.match_re(["actual 1\n", "actual 2\n"], list_of_regexes)
-
- test.match_re_dotall("actual 1\nactual 2\n", regex_string)
- test.match_re_dotall(["actual 1\n", "actual 2\n"], list_of_regexes)
-
- test.tempdir()
- test.tempdir('temporary-directory')
-
- test.sleep()
- test.sleep(seconds)
-
- test.where_is('foo')
- test.where_is('foo', 'PATH1:PATH2')
- test.where_is('foo', 'PATH1;PATH2', '.suffix3;.suffix4')
-
- test.unlink('file')
- test.unlink('subdir', 'file')
-
-The TestCmd module provides pass_test(), fail_test(), and no_result()
-unbound functions that report test results for use with the Aegis change
-management system. These methods terminate the test immediately,
-reporting PASSED, FAILED, or NO RESULT respectively, and exiting with
-status 0 (success), 1 or 2 respectively. This allows for a distinction
-between an actual failed test and a test that could not be properly
-evaluated because of an external condition (such as a full file system
-or incorrect permissions).
-
- import TestCmd
-
- TestCmd.pass_test()
- TestCmd.pass_test(condition)
- TestCmd.pass_test(condition, function)
-
- TestCmd.fail_test()
- TestCmd.fail_test(condition)
- TestCmd.fail_test(condition, function)
- TestCmd.fail_test(condition, function, skip)
-
- TestCmd.no_result()
- TestCmd.no_result(condition)
- TestCmd.no_result(condition, function)
- TestCmd.no_result(condition, function, skip)
-
-The TestCmd module also provides unbound functions that handle matching
-in the same way as the match_*() methods described above.
-
- import TestCmd
-
- test = TestCmd.TestCmd(match = TestCmd.match_exact)
-
- test = TestCmd.TestCmd(match = TestCmd.match_re)
-
- test = TestCmd.TestCmd(match = TestCmd.match_re_dotall)
-
-The TestCmd module provides unbound functions that can be used for the
-"diff" argument to TestCmd.TestCmd instantiation:
-
- import TestCmd
-
- test = TestCmd.TestCmd(match = TestCmd.match_re,
- diff = TestCmd.diff_re)
-
- test = TestCmd.TestCmd(diff = TestCmd.simple_diff)
-
-The "diff" argument can also be used with standard difflib functions:
-
- import difflib
-
- test = TestCmd.TestCmd(diff = difflib.context_diff)
-
- test = TestCmd.TestCmd(diff = difflib.unified_diff)
-
-Lastly, the where_is() method also exists in an unbound function
-version.
-
- import TestCmd
-
- TestCmd.where_is('foo')
- TestCmd.where_is('foo', 'PATH1:PATH2')
- TestCmd.where_is('foo', 'PATH1;PATH2', '.suffix3;.suffix4')
-"""
-
-# Copyright 2000-2010 Steven Knight
-# This module is free software, and you may redistribute it and/or modify
-# it under the same terms as Python itself, so long as this copyright message
-# and disclaimer are retained in their original form.
-#
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
-# THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-# DAMAGE.
-#
-# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-# PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
-# AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
-# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-__author__ = "Steven Knight <knight at baldmt dot com>"
-__revision__ = "TestCmd.py 0.37.D001 2010/01/11 16:55:50 knight"
-__version__ = "0.37"
-
-import errno
-import os
-import os.path
-import re
-import shutil
-import stat
-import string
-import sys
-import tempfile
-import time
-import traceback
-import types
-import UserList
-
-__all__ = [
- 'diff_re',
- 'fail_test',
- 'no_result',
- 'pass_test',
- 'match_exact',
- 'match_re',
- 'match_re_dotall',
- 'python_executable',
- 'TestCmd'
-]
-
-try:
- import difflib
-except ImportError:
- __all__.append('simple_diff')
-
-def is_List(e):
- return type(e) is types.ListType \
- or isinstance(e, UserList.UserList)
-
-try:
- from UserString import UserString
-except ImportError:
- class UserString:
- pass
-
-if hasattr(types, 'UnicodeType'):
- def is_String(e):
- return type(e) is types.StringType \
- or type(e) is types.UnicodeType \
- or isinstance(e, UserString)
-else:
- def is_String(e):
- return type(e) is types.StringType or isinstance(e, UserString)
-
-tempfile.template = 'testcmd.'
-if os.name in ('posix', 'nt'):
- tempfile.template = 'testcmd.' + str(os.getpid()) + '.'
-else:
- tempfile.template = 'testcmd.'
-
-re_space = re.compile('\s')
-
-_Cleanup = []
-
-_chain_to_exitfunc = None
-
-def _clean():
- global _Cleanup
- cleanlist = filter(None, _Cleanup)
- del _Cleanup[:]
- cleanlist.reverse()
- for test in cleanlist:
- test.cleanup()
- if _chain_to_exitfunc:
- _chain_to_exitfunc()
-
-try:
- import atexit
-except ImportError:
- # TODO(1.5): atexit requires python 2.0, so chain sys.exitfunc
- try:
- _chain_to_exitfunc = sys.exitfunc
- except AttributeError:
- pass
- sys.exitfunc = _clean
-else:
- atexit.register(_clean)
-
-try:
- zip
-except NameError:
- def zip(*lists):
- result = []
- for i in xrange(min(map(len, lists))):
- result.append(tuple(map(lambda l, i=i: l[i], lists)))
- return result
-
-class Collector:
- def __init__(self, top):
- self.entries = [top]
- def __call__(self, arg, dirname, names):
- pathjoin = lambda n, d=dirname: os.path.join(d, n)
- self.entries.extend(map(pathjoin, names))
-
-def _caller(tblist, skip):
- string = ""
- arr = []
- for file, line, name, text in tblist:
- if file[-10:] == "TestCmd.py":
- break
- arr = [(file, line, name, text)] + arr
- atfrom = "at"
- for file, line, name, text in arr[skip:]:
- if name in ("?", "<module>"):
- name = ""
- else:
- name = " (" + name + ")"
- string = string + ("%s line %d of %s%s\n" % (atfrom, line, file, name))
- atfrom = "\tfrom"
- return string
-
-def fail_test(self = None, condition = 1, function = None, skip = 0):
- """Cause the test to fail.
-
- By default, the fail_test() method reports that the test FAILED
- and exits with a status of 1. If a condition argument is supplied,
- the test fails only if the condition is true.
- """
- if not condition:
- return
- if not function is None:
- function()
- of = ""
- desc = ""
- sep = " "
- if not self is None:
- if self.program:
- of = " of " + self.program
- sep = "\n\t"
- if self.description:
- desc = " [" + self.description + "]"
- sep = "\n\t"
-
- at = _caller(traceback.extract_stack(), skip)
- sys.stderr.write("FAILED test" + of + desc + sep + at)
-
- sys.exit(1)
-
-def no_result(self = None, condition = 1, function = None, skip = 0):
- """Causes a test to exit with no valid result.
-
- By default, the no_result() method reports NO RESULT for the test
- and exits with a status of 2. If a condition argument is supplied,
- the test fails only if the condition is true.
- """
- if not condition:
- return
- if not function is None:
- function()
- of = ""
- desc = ""
- sep = " "
- if not self is None:
- if self.program:
- of = " of " + self.program
- sep = "\n\t"
- if self.description:
- desc = " [" + self.description + "]"
- sep = "\n\t"
-
- if os.environ.get('TESTCMD_DEBUG_SKIPS'):
- at = _caller(traceback.extract_stack(), skip)
- sys.stderr.write("NO RESULT for test" + of + desc + sep + at)
- else:
- sys.stderr.write("NO RESULT\n")
-
- sys.exit(2)
-
-def pass_test(self = None, condition = 1, function = None):
- """Causes a test to pass.
-
- By default, the pass_test() method reports PASSED for the test
- and exits with a status of 0. If a condition argument is supplied,
- the test passes only if the condition is true.
- """
- if not condition:
- return
- if not function is None:
- function()
- sys.stderr.write("PASSED\n")
- sys.exit(0)
-
-def match_exact(lines = None, matches = None):
- """
- """
- if not is_List(lines):
- lines = string.split(lines, "\n")
- if not is_List(matches):
- matches = string.split(matches, "\n")
- if len(lines) != len(matches):
- return
- for i in range(len(lines)):
- if lines[i] != matches[i]:
- return
- return 1
-
-def match_re(lines = None, res = None):
- """
- """
- if not is_List(lines):
- lines = string.split(lines, "\n")
- if not is_List(res):
- res = string.split(res, "\n")
- if len(lines) != len(res):
- return
- for i in range(len(lines)):
- s = "^" + res[i] + "$"
- try:
- expr = re.compile(s)
- except re.error, e:
- msg = "Regular expression error in %s: %s"
- raise re.error, msg % (repr(s), e[0])
- if not expr.search(lines[i]):
- return
- return 1
-
-def match_re_dotall(lines = None, res = None):
- """
- """
- if not type(lines) is type(""):
- lines = string.join(lines, "\n")
- if not type(res) is type(""):
- res = string.join(res, "\n")
- s = "^" + res + "$"
- try:
- expr = re.compile(s, re.DOTALL)
- except re.error, e:
- msg = "Regular expression error in %s: %s"
- raise re.error, msg % (repr(s), e[0])
- if expr.match(lines):
- return 1
-
-try:
- import difflib
-except ImportError:
- pass
-else:
- def simple_diff(a, b, fromfile='', tofile='',
- fromfiledate='', tofiledate='', n=3, lineterm='\n'):
- """
- A function with the same calling signature as difflib.context_diff
- (diff -c) and difflib.unified_diff (diff -u) but which prints
- output like the simple, unadorned 'diff" command.
- """
- sm = difflib.SequenceMatcher(None, a, b)
- def comma(x1, x2):
- return x1+1 == x2 and str(x2) or '%s,%s' % (x1+1, x2)
- result = []
- for op, a1, a2, b1, b2 in sm.get_opcodes():
- if op == 'delete':
- result.append("%sd%d" % (comma(a1, a2), b1))
- result.extend(map(lambda l: '< ' + l, a[a1:a2]))
- elif op == 'insert':
- result.append("%da%s" % (a1, comma(b1, b2)))
- result.extend(map(lambda l: '> ' + l, b[b1:b2]))
- elif op == 'replace':
- result.append("%sc%s" % (comma(a1, a2), comma(b1, b2)))
- result.extend(map(lambda l: '< ' + l, a[a1:a2]))
- result.append('---')
- result.extend(map(lambda l: '> ' + l, b[b1:b2]))
- return result
-
-def diff_re(a, b, fromfile='', tofile='',
- fromfiledate='', tofiledate='', n=3, lineterm='\n'):
- """
- A simple "diff" of two sets of lines when the expected lines
- are regular expressions. This is a really dumb thing that
- just compares each line in turn, so it doesn't look for
- chunks of matching lines and the like--but at least it lets
- you know exactly which line first didn't compare correctl...
- """
- result = []
- diff = len(a) - len(b)
- if diff < 0:
- a = a + ['']*(-diff)
- elif diff > 0:
- b = b + ['']*diff
- i = 0
- for aline, bline in zip(a, b):
- s = "^" + aline + "$"
- try:
- expr = re.compile(s)
- except re.error, e:
- msg = "Regular expression error in %s: %s"
- raise re.error, msg % (repr(s), e[0])
- if not expr.search(bline):
- result.append("%sc%s" % (i+1, i+1))
- result.append('< ' + repr(a[i]))
- result.append('---')
- result.append('> ' + repr(b[i]))
- i = i+1
- return result
-
-if os.name == 'java':
-
- python_executable = os.path.join(sys.prefix, 'jython')
-
-else:
-
- python_executable = sys.executable
-
-if sys.platform == 'win32':
-
- default_sleep_seconds = 2
-
- def where_is(file, path=None, pathext=None):
- if path is None:
- path = os.environ['PATH']
- if is_String(path):
- path = string.split(path, os.pathsep)
- if pathext is None:
- pathext = os.environ['PATHEXT']
- if is_String(pathext):
- pathext = string.split(pathext, os.pathsep)
- for ext in pathext:
- if string.lower(ext) == string.lower(file[-len(ext):]):
- pathext = ['']
- break
- for dir in path:
- f = os.path.join(dir, file)
- for ext in pathext:
- fext = f + ext
- if os.path.isfile(fext):
- return fext
- return None
-
-else:
-
- def where_is(file, path=None, pathext=None):
- if path is None:
- path = os.environ['PATH']
- if is_String(path):
- path = string.split(path, os.pathsep)
- for dir in path:
- f = os.path.join(dir, file)
- if os.path.isfile(f):
- try:
- st = os.stat(f)
- except OSError:
- continue
- if stat.S_IMODE(st[stat.ST_MODE]) & 0111:
- return f
- return None
-
- default_sleep_seconds = 1
-
-
-
-try:
- import subprocess
-except ImportError:
- # The subprocess module doesn't exist in this version of Python,
- # so we're going to cobble up something that looks just enough
- # like its API for our purposes below.
- import new
-
- subprocess = new.module('subprocess')
-
- subprocess.PIPE = 'PIPE'
- subprocess.STDOUT = 'STDOUT'
- subprocess.mswindows = (sys.platform == 'win32')
-
- try:
- import popen2
- popen2.Popen3
- except AttributeError:
- class Popen3:
- universal_newlines = 1
- def __init__(self, command, **kw):
- if sys.platform == 'win32' and command[0] == '"':
- command = '"' + command + '"'
- (stdin, stdout, stderr) = os.popen3(' ' + command)
- self.stdin = stdin
- self.stdout = stdout
- self.stderr = stderr
- def close_output(self):
- self.stdout.close()
- self.resultcode = self.stderr.close()
- def wait(self):
- resultcode = self.resultcode
- if os.WIFEXITED(resultcode):
- return os.WEXITSTATUS(resultcode)
- elif os.WIFSIGNALED(resultcode):
- return os.WTERMSIG(resultcode)
- else:
- return None
-
- else:
- try:
- popen2.Popen4
- except AttributeError:
- # A cribbed Popen4 class, with some retrofitted code from
- # the Python 1.5 Popen3 class methods to do certain things
- # by hand.
- class Popen4(popen2.Popen3):
- childerr = None
-
- def __init__(self, cmd, bufsize=-1):
- p2cread, p2cwrite = os.pipe()
- c2pread, c2pwrite = os.pipe()
- self.pid = os.fork()
- if self.pid == 0:
- # Child
- os.dup2(p2cread, 0)
- os.dup2(c2pwrite, 1)
- os.dup2(c2pwrite, 2)
- for i in range(3, popen2.MAXFD):
- try:
- os.close(i)
- except: pass
- try:
- os.execvp(cmd[0], cmd)
- finally:
- os._exit(1)
- # Shouldn't come here, I guess
- os._exit(1)
- os.close(p2cread)
- self.tochild = os.fdopen(p2cwrite, 'w', bufsize)
- os.close(c2pwrite)
- self.fromchild = os.fdopen(c2pread, 'r', bufsize)
- popen2._active.append(self)
-
- popen2.Popen4 = Popen4
-
- class Popen3(popen2.Popen3, popen2.Popen4):
- universal_newlines = 1
- def __init__(self, command, **kw):
- if kw.get('stderr') == 'STDOUT':
- apply(popen2.Popen4.__init__, (self, command, 1))
- else:
- apply(popen2.Popen3.__init__, (self, command, 1))
- self.stdin = self.tochild
- self.stdout = self.fromchild
- self.stderr = self.childerr
- def wait(self, *args, **kw):
- resultcode = apply(popen2.Popen3.wait, (self,)+args, kw)
- if os.WIFEXITED(resultcode):
- return os.WEXITSTATUS(resultcode)
- elif os.WIFSIGNALED(resultcode):
- return os.WTERMSIG(resultcode)
- else:
- return None
-
- subprocess.Popen = Popen3
-
-
-
-# From Josiah Carlson,
-# ASPN : Python Cookbook : Module to allow Asynchronous subprocess use on Windows and Posix platforms
-# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554
-
-PIPE = subprocess.PIPE
-
-if subprocess.mswindows:
- from win32file import ReadFile, WriteFile
- from win32pipe import PeekNamedPipe
- import msvcrt
-else:
- import select
- import fcntl
-
- try: fcntl.F_GETFL
- except AttributeError: fcntl.F_GETFL = 3
-
- try: fcntl.F_SETFL
- except AttributeError: fcntl.F_SETFL = 4
-
-class Popen(subprocess.Popen):
- def recv(self, maxsize=None):
- return self._recv('stdout', maxsize)
-
- def recv_err(self, maxsize=None):
- return self._recv('stderr', maxsize)
-
- def send_recv(self, input='', maxsize=None):
- return self.send(input), self.recv(maxsize), self.recv_err(maxsize)
-
- def get_conn_maxsize(self, which, maxsize):
- if maxsize is None:
- maxsize = 1024
- elif maxsize < 1:
- maxsize = 1
- return getattr(self, which), maxsize
-
- def _close(self, which):
- getattr(self, which).close()
- setattr(self, which, None)
-
- if subprocess.mswindows:
- def send(self, input):
- if not self.stdin:
- return None
-
- try:
- x = msvcrt.get_osfhandle(self.stdin.fileno())
- (errCode, written) = WriteFile(x, input)
- except ValueError:
- return self._close('stdin')
- except (subprocess.pywintypes.error, Exception), why:
- if why[0] in (109, errno.ESHUTDOWN):
- return self._close('stdin')
- raise
-
- return written
-
- def _recv(self, which, maxsize):
- conn, maxsize = self.get_conn_maxsize(which, maxsize)
- if conn is None:
- return None
-
- try:
- x = msvcrt.get_osfhandle(conn.fileno())
- (read, nAvail, nMessage) = PeekNamedPipe(x, 0)
- if maxsize < nAvail:
- nAvail = maxsize
- if nAvail > 0:
- (errCode, read) = ReadFile(x, nAvail, None)
- except ValueError:
- return self._close(which)
- except (subprocess.pywintypes.error, Exception), why:
- if why[0] in (109, errno.ESHUTDOWN):
- return self._close(which)
- raise
-
- #if self.universal_newlines:
- # read = self._translate_newlines(read)
- return read
-
- else:
- def send(self, input):
- if not self.stdin:
- return None
-
- if not select.select([], [self.stdin], [], 0)[1]:
- return 0
-
- try:
- written = os.write(self.stdin.fileno(), input)
- except OSError, why:
- if why[0] == errno.EPIPE: #broken pipe
- return self._close('stdin')
- raise
-
- return written
-
- def _recv(self, which, maxsize):
- conn, maxsize = self.get_conn_maxsize(which, maxsize)
- if conn is None:
- return None
-
- try:
- flags = fcntl.fcntl(conn, fcntl.F_GETFL)
- except TypeError:
- flags = None
- else:
- if not conn.closed:
- fcntl.fcntl(conn, fcntl.F_SETFL, flags| os.O_NONBLOCK)
-
- try:
- if not select.select([conn], [], [], 0)[0]:
- return ''
-
- r = conn.read(maxsize)
- if not r:
- return self._close(which)
-
- #if self.universal_newlines:
- # r = self._translate_newlines(r)
- return r
- finally:
- if not conn.closed and not flags is None:
- fcntl.fcntl(conn, fcntl.F_SETFL, flags)
-
-disconnect_message = "Other end disconnected!"
-
-def recv_some(p, t=.1, e=1, tr=5, stderr=0):
- if tr < 1:
- tr = 1
- x = time.time()+t
- y = []
- r = ''
- pr = p.recv
- if stderr:
- pr = p.recv_err
- while time.time() < x or r:
- r = pr()
- if r is None:
- if e:
- raise Exception(disconnect_message)
- else:
- break
- elif r:
- y.append(r)
- else:
- time.sleep(max((x-time.time())/tr, 0))
- return ''.join(y)
-
-# TODO(3.0: rewrite to use memoryview()
-def send_all(p, data):
- while len(data):
- sent = p.send(data)
- if sent is None:
- raise Exception(disconnect_message)
- data = buffer(data, sent)
-
-
-
-try:
- object
-except NameError:
- class object:
- pass
-
-
-
-class TestCmd(object):
- """Class TestCmd
- """
-
- def __init__(self, description = None,
- program = None,
- interpreter = None,
- workdir = None,
- subdir = None,
- verbose = None,
- match = None,
- diff = None,
- combine = 0,
- universal_newlines = 1):
- self._cwd = os.getcwd()
- self.description_set(description)
- self.program_set(program)
- self.interpreter_set(interpreter)
- if verbose is None:
- try:
- verbose = max( 0, int(os.environ.get('TESTCMD_VERBOSE', 0)) )
- except ValueError:
- verbose = 0
- self.verbose_set(verbose)
- self.combine = combine
- self.universal_newlines = universal_newlines
- if match is not None:
- self.match_function = match
- else:
- self.match_function = match_re
- if diff is not None:
- self.diff_function = diff
- else:
- try:
- difflib
- except NameError:
- pass
- else:
- self.diff_function = simple_diff
- #self.diff_function = difflib.context_diff
- #self.diff_function = difflib.unified_diff
- self._dirlist = []
- self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0}
- if os.environ.has_key('PRESERVE') and not os.environ['PRESERVE'] is '':
- self._preserve['pass_test'] = os.environ['PRESERVE']
- self._preserve['fail_test'] = os.environ['PRESERVE']
- self._preserve['no_result'] = os.environ['PRESERVE']
- else:
- try:
- self._preserve['pass_test'] = os.environ['PRESERVE_PASS']
- except KeyError:
- pass
- try:
- self._preserve['fail_test'] = os.environ['PRESERVE_FAIL']
- except KeyError:
- pass
- try:
- self._preserve['no_result'] = os.environ['PRESERVE_NO_RESULT']
- except KeyError:
- pass
- self._stdout = []
- self._stderr = []
- self.status = None
- self.condition = 'no_result'
- self.workdir_set(workdir)
- self.subdir(subdir)
-
- def __del__(self):
- self.cleanup()
-
- def __repr__(self):
- return "%x" % id(self)
-
- banner_char = '='
- banner_width = 80
-
- def banner(self, s, width=None):
- if width is None:
- width = self.banner_width
- return s + self.banner_char * (width - len(s))
-
- if os.name == 'posix':
-
- def escape(self, arg):
- "escape shell special characters"
- slash = '\\'
- special = '"$'
-
- arg = string.replace(arg, slash, slash+slash)
- for c in special:
- arg = string.replace(arg, c, slash+c)
-
- if re_space.search(arg):
- arg = '"' + arg + '"'
- return arg
-
- else:
-
- # Windows does not allow special characters in file names
- # anyway, so no need for an escape function, we will just quote
- # the arg.
- def escape(self, arg):
- if re_space.search(arg):
- arg = '"' + arg + '"'
- return arg
-
- def canonicalize(self, path):
- if is_List(path):
- path = apply(os.path.join, tuple(path))
- if not os.path.isabs(path):
- path = os.path.join(self.workdir, path)
- return path
-
- def chmod(self, path, mode):
- """Changes permissions on the specified file or directory
- path name."""
- path = self.canonicalize(path)
- os.chmod(path, mode)
-
- def cleanup(self, condition = None):
- """Removes any temporary working directories for the specified
- TestCmd environment. If the environment variable PRESERVE was
- set when the TestCmd environment was created, temporary working
- directories are not removed. If any of the environment variables
- PRESERVE_PASS, PRESERVE_FAIL, or PRESERVE_NO_RESULT were set
- when the TestCmd environment was created, then temporary working
- directories are not removed if the test passed, failed, or had
- no result, respectively. Temporary working directories are also
- preserved for conditions specified via the preserve method.
-
- Typically, this method is not called directly, but is used when
- the script exits to clean up temporary working directories as
- appropriate for the exit status.
- """
- if not self._dirlist:
- return
- os.chdir(self._cwd)
- self.workdir = None
- if condition is None:
- condition = self.condition
- if self._preserve[condition]:
- for dir in self._dirlist:
- print "Preserved directory", dir
- else:
- list = self._dirlist[:]
- list.reverse()
- for dir in list:
- self.writable(dir, 1)
- shutil.rmtree(dir, ignore_errors = 1)
- self._dirlist = []
-
- try:
- global _Cleanup
- _Cleanup.remove(self)
- except (AttributeError, ValueError):
- pass
-
- def command_args(self, program = None,
- interpreter = None,
- arguments = None):
- if program:
- if type(program) == type('') and not os.path.isabs(program):
- program = os.path.join(self._cwd, program)
- else:
- program = self.program
- if not interpreter:
- interpreter = self.interpreter
- if not type(program) in [type([]), type(())]:
- program = [program]
- cmd = list(program)
- if interpreter:
- if not type(interpreter) in [type([]), type(())]:
- interpreter = [interpreter]
- cmd = list(interpreter) + cmd
- if arguments:
- if type(arguments) == type(''):
- arguments = string.split(arguments)
- cmd.extend(arguments)
- return cmd
-
- def description_set(self, description):
- """Set the description of the functionality being tested.
- """
- self.description = description
-
- try:
- difflib
- except NameError:
- def diff(self, a, b, name, *args, **kw):
- print self.banner('Expected %s' % name)
- print a
- print self.banner('Actual %s' % name)
- print b
- else:
- def diff(self, a, b, name, *args, **kw):
- print self.banner(name)
- args = (a.splitlines(), b.splitlines()) + args
- lines = apply(self.diff_function, args, kw)
- for l in lines:
- print l
-
- def fail_test(self, condition = 1, function = None, skip = 0):
- """Cause the test to fail.
- """
- if not condition:
- return
- self.condition = 'fail_test'
- fail_test(self = self,
- condition = condition,
- function = function,
- skip = skip)
-
- def interpreter_set(self, interpreter):
- """Set the program to be used to interpret the program
- under test as a script.
- """
- self.interpreter = interpreter
-
- def match(self, lines, matches):
- """Compare actual and expected file contents.
- """
- return self.match_function(lines, matches)
-
- def match_exact(self, lines, matches):
- """Compare actual and expected file contents.
- """
- return match_exact(lines, matches)
-
- def match_re(self, lines, res):
- """Compare actual and expected file contents.
- """
- return match_re(lines, res)
-
- def match_re_dotall(self, lines, res):
- """Compare actual and expected file contents.
- """
- return match_re_dotall(lines, res)
-
- def no_result(self, condition = 1, function = None, skip = 0):
- """Report that the test could not be run.
- """
- if not condition:
- return
- self.condition = 'no_result'
- no_result(self = self,
- condition = condition,
- function = function,
- skip = skip)
-
- def pass_test(self, condition = 1, function = None):
- """Cause the test to pass.
- """
- if not condition:
- return
- self.condition = 'pass_test'
- pass_test(self = self, condition = condition, function = function)
-
- def preserve(self, *conditions):
- """Arrange for the temporary working directories for the
- specified TestCmd environment to be preserved for one or more
- conditions. If no conditions are specified, arranges for
- the temporary working directories to be preserved for all
- conditions.
- """
- if conditions is ():
- conditions = ('pass_test', 'fail_test', 'no_result')
- for cond in conditions:
- self._preserve[cond] = 1
-
- def program_set(self, program):
- """Set the executable program or script to be tested.
- """
- if program and not os.path.isabs(program):
- program = os.path.join(self._cwd, program)
- self.program = program
-
- def read(self, file, mode = 'rb'):
- """Reads and returns the contents of the specified file name.
- The file name may be a list, in which case the elements are
- concatenated with the os.path.join() method. The file is
- assumed to be under the temporary working directory unless it
- is an absolute path name. The I/O mode for the file may
- be specified; it must begin with an 'r'. The default is
- 'rb' (binary read).
- """
- file = self.canonicalize(file)
- if mode[0] != 'r':
- raise ValueError, "mode must begin with 'r'"
- with open(file, mode) as f:
- result = f.read()
- return result
-
- def rmdir(self, dir):
- """Removes the specified dir name.
- The dir name may be a list, in which case the elements are
- concatenated with the os.path.join() method. The dir is
- assumed to be under the temporary working directory unless it
- is an absolute path name.
- The dir must be empty.
- """
- dir = self.canonicalize(dir)
- os.rmdir(dir)
-
- def start(self, program = None,
- interpreter = None,
- arguments = None,
- universal_newlines = None,
- **kw):
- """
- Starts a program or script for the test environment.
-
- The specified program will have the original directory
- prepended unless it is enclosed in a [list].
- """
- cmd = self.command_args(program, interpreter, arguments)
- cmd_string = string.join(map(self.escape, cmd), ' ')
- if self.verbose:
- sys.stderr.write(cmd_string + "\n")
- if universal_newlines is None:
- universal_newlines = self.universal_newlines
-
- # On Windows, if we make stdin a pipe when we plan to send
- # no input, and the test program exits before
- # Popen calls msvcrt.open_osfhandle, that call will fail.
- # So don't use a pipe for stdin if we don't need one.
- stdin = kw.get('stdin', None)
- if stdin is not None:
- stdin = subprocess.PIPE
-
- combine = kw.get('combine', self.combine)
- if combine:
- stderr_value = subprocess.STDOUT
- else:
- stderr_value = subprocess.PIPE
-
- return Popen(cmd,
- stdin=stdin,
- stdout=subprocess.PIPE,
- stderr=stderr_value,
- universal_newlines=universal_newlines)
-
- def finish(self, popen, **kw):
- """
- Finishes and waits for the process being run under control of
- the specified popen argument, recording the exit status,
- standard output and error output.
- """
- popen.stdin.close()
- self.status = popen.wait()
- if not self.status:
- self.status = 0
- self._stdout.append(popen.stdout.read())
- if popen.stderr:
- stderr = popen.stderr.read()
- else:
- stderr = ''
- self._stderr.append(stderr)
-
- def run(self, program = None,
- interpreter = None,
- arguments = None,
- chdir = None,
- stdin = None,
- universal_newlines = None):
- """Runs a test of the program or script for the test
- environment. Standard output and error output are saved for
- future retrieval via the stdout() and stderr() methods.
-
- The specified program will have the original directory
- prepended unless it is enclosed in a [list].
- """
- if chdir:
- oldcwd = os.getcwd()
- if not os.path.isabs(chdir):
- chdir = os.path.join(self.workpath(chdir))
- if self.verbose:
- sys.stderr.write("chdir(" + chdir + ")\n")
- os.chdir(chdir)
- p = self.start(program,
- interpreter,
- arguments,
- universal_newlines,
- stdin=stdin)
- if stdin:
- if is_List(stdin):
- for line in stdin:
- p.stdin.write(line)
- else:
- p.stdin.write(stdin)
- p.stdin.close()
-
- out = p.stdout.read()
- if p.stderr is None:
- err = ''
- else:
- err = p.stderr.read()
- try:
- close_output = p.close_output
- except AttributeError:
- p.stdout.close()
- if not p.stderr is None:
- p.stderr.close()
- else:
- close_output()
-
- self._stdout.append(out)
- self._stderr.append(err)
-
- self.status = p.wait()
- if not self.status:
- self.status = 0
-
- if chdir:
- os.chdir(oldcwd)
- if self.verbose >= 2:
- write = sys.stdout.write
- write('============ STATUS: %d\n' % self.status)
- out = self.stdout()
- if out or self.verbose >= 3:
- write('============ BEGIN STDOUT (len=%d):\n' % len(out))
- write(out)
- write('============ END STDOUT\n')
- err = self.stderr()
- if err or self.verbose >= 3:
- write('============ BEGIN STDERR (len=%d)\n' % len(err))
- write(err)
- write('============ END STDERR\n')
-
- def sleep(self, seconds = default_sleep_seconds):
- """Sleeps at least the specified number of seconds. If no
- number is specified, sleeps at least the minimum number of
- seconds necessary to advance file time stamps on the current
- system. Sleeping more seconds is all right.
- """
- time.sleep(seconds)
-
- def stderr(self, run = None):
- """Returns the error output from the specified run number.
- If there is no specified run number, then returns the error
- output of the last run. If the run number is less than zero,
- then returns the error output from that many runs back from the
- current run.
- """
- if not run:
- run = len(self._stderr)
- elif run < 0:
- run = len(self._stderr) + run
- run = run - 1
- return self._stderr[run]
-
- def stdout(self, run = None):
- """Returns the standard output from the specified run number.
- If there is no specified run number, then returns the standard
- output of the last run. If the run number is less than zero,
- then returns the standard output from that many runs back from
- the current run.
- """
- if not run:
- run = len(self._stdout)
- elif run < 0:
- run = len(self._stdout) + run
- run = run - 1
- return self._stdout[run]
-
- def subdir(self, *subdirs):
- """Create new subdirectories under the temporary working
- directory, one for each argument. An argument may be a list,
- in which case the list elements are concatenated using the
- os.path.join() method. Subdirectories multiple levels deep
- must be created using a separate argument for each level:
-
- test.subdir('sub', ['sub', 'dir'], ['sub', 'dir', 'ectory'])
-
- Returns the number of subdirectories actually created.
- """
- count = 0
- for sub in subdirs:
- if sub is None:
- continue
- if is_List(sub):
- sub = apply(os.path.join, tuple(sub))
- new = os.path.join(self.workdir, sub)
- try:
- os.mkdir(new)
- except OSError:
- pass
- else:
- count = count + 1
- return count
-
- def symlink(self, target, link):
- """Creates a symlink to the specified target.
- The link name may be a list, in which case the elements are
- concatenated with the os.path.join() method. The link is
- assumed to be under the temporary working directory unless it
- is an absolute path name. The target is *not* assumed to be
- under the temporary working directory.
- """
- link = self.canonicalize(link)
- os.symlink(target, link)
-
- def tempdir(self, path=None):
- """Creates a temporary directory.
- A unique directory name is generated if no path name is specified.
- The directory is created, and will be removed when the TestCmd
- object is destroyed.
- """
- if path is None:
- try:
- path = tempfile.mktemp(prefix=tempfile.template)
- except TypeError:
- path = tempfile.mktemp()
- os.mkdir(path)
-
- # Symlinks in the path will report things
- # differently from os.getcwd(), so chdir there
- # and back to fetch the canonical path.
- cwd = os.getcwd()
- try:
- os.chdir(path)
- path = os.getcwd()
- finally:
- os.chdir(cwd)
-
- # Uppercase the drive letter since the case of drive
- # letters is pretty much random on win32:
- drive,rest = os.path.splitdrive(path)
- if drive:
- path = string.upper(drive) + rest
-
- #
- self._dirlist.append(path)
- global _Cleanup
- try:
- _Cleanup.index(self)
- except ValueError:
- _Cleanup.append(self)
-
- return path
-
- def touch(self, path, mtime=None):
- """Updates the modification time on the specified file or
- directory path name. The default is to update to the
- current time if no explicit modification time is specified.
- """
- path = self.canonicalize(path)
- atime = os.path.getatime(path)
- if mtime is None:
- mtime = time.time()
- os.utime(path, (atime, mtime))
-
- def unlink(self, file):
- """Unlinks the specified file name.
- The file name may be a list, in which case the elements are
- concatenated with the os.path.join() method. The file is
- assumed to be under the temporary working directory unless it
- is an absolute path name.
- """
- file = self.canonicalize(file)
- os.unlink(file)
-
- def verbose_set(self, verbose):
- """Set the verbose level.
- """
- self.verbose = verbose
-
- def where_is(self, file, path=None, pathext=None):
- """Find an executable file.
- """
- if is_List(file):
- file = apply(os.path.join, tuple(file))
- if not os.path.isabs(file):
- file = where_is(file, path, pathext)
- return file
-
- def workdir_set(self, path):
- """Creates a temporary working directory with the specified
- path name. If the path is a null string (''), a unique
- directory name is created.
- """
- if (path != None):
- if path == '':
- path = None
- path = self.tempdir(path)
- self.workdir = path
-
- def workpath(self, *args):
- """Returns the absolute path name to a subdirectory or file
- within the current temporary working directory. Concatenates
- the temporary working directory name with the specified
- arguments using the os.path.join() method.
- """
- return apply(os.path.join, (self.workdir,) + tuple(args))
-
- def readable(self, top, read=1):
- """Make the specified directory tree readable (read == 1)
- or not (read == None).
-
- This method has no effect on Windows systems, which use a
- completely different mechanism to control file readability.
- """
-
- if sys.platform == 'win32':
- return
-
- if read:
- def do_chmod(fname):
- try: st = os.stat(fname)
- except OSError: pass
- else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|stat.S_IREAD))
- else:
- def do_chmod(fname):
- try: st = os.stat(fname)
- except OSError: pass
- else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~stat.S_IREAD))
-
- if os.path.isfile(top):
- # If it's a file, that's easy, just chmod it.
- do_chmod(top)
- elif read:
- # It's a directory and we're trying to turn on read
- # permission, so it's also pretty easy, just chmod the
- # directory and then chmod every entry on our walk down the
- # tree. Because os.path.walk() is top-down, we'll enable
- # read permission on any directories that have it disabled
- # before os.path.walk() tries to list their contents.
- do_chmod(top)
-
- def chmod_entries(arg, dirname, names, do_chmod=do_chmod):
- for n in names:
- do_chmod(os.path.join(dirname, n))
-
- os.path.walk(top, chmod_entries, None)
- else:
- # It's a directory and we're trying to turn off read
- # permission, which means we have to chmod the directoreis
- # in the tree bottom-up, lest disabling read permission from
- # the top down get in the way of being able to get at lower
- # parts of the tree. But os.path.walk() visits things top
- # down, so we just use an object to collect a list of all
- # of the entries in the tree, reverse the list, and then
- # chmod the reversed (bottom-up) list.
- col = Collector(top)
- os.path.walk(top, col, None)
- col.entries.reverse()
- for d in col.entries: do_chmod(d)
-
- def writable(self, top, write=1):
- """Make the specified directory tree writable (write == 1)
- or not (write == None).
- """
-
- if sys.platform == 'win32':
-
- if write:
- def do_chmod(fname):
- try: os.chmod(fname, stat.S_IWRITE)
- except OSError: pass
- else:
- def do_chmod(fname):
- try: os.chmod(fname, stat.S_IREAD)
- except OSError: pass
-
- else:
-
- if write:
- def do_chmod(fname):
- try: st = os.stat(fname)
- except OSError: pass
- else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|0200))
- else:
- def do_chmod(fname):
- try: st = os.stat(fname)
- except OSError: pass
- else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~0200))
-
- if os.path.isfile(top):
- do_chmod(top)
- else:
- col = Collector(top)
- os.path.walk(top, col, None)
- for d in col.entries: do_chmod(d)
-
- def executable(self, top, execute=1):
- """Make the specified directory tree executable (execute == 1)
- or not (execute == None).
-
- This method has no effect on Windows systems, which use a
- completely different mechanism to control file executability.
- """
-
- if sys.platform == 'win32':
- return
-
- if execute:
- def do_chmod(fname):
- try: st = os.stat(fname)
- except OSError: pass
- else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]|stat.S_IEXEC))
- else:
- def do_chmod(fname):
- try: st = os.stat(fname)
- except OSError: pass
- else: os.chmod(fname, stat.S_IMODE(st[stat.ST_MODE]&~stat.S_IEXEC))
-
- if os.path.isfile(top):
- # If it's a file, that's easy, just chmod it.
- do_chmod(top)
- elif execute:
- # It's a directory and we're trying to turn on execute
- # permission, so it's also pretty easy, just chmod the
- # directory and then chmod every entry on our walk down the
- # tree. Because os.path.walk() is top-down, we'll enable
- # execute permission on any directories that have it disabled
- # before os.path.walk() tries to list their contents.
- do_chmod(top)
-
- def chmod_entries(arg, dirname, names, do_chmod=do_chmod):
- for n in names:
- do_chmod(os.path.join(dirname, n))
-
- os.path.walk(top, chmod_entries, None)
- else:
- # It's a directory and we're trying to turn off execute
- # permission, which means we have to chmod the directories
- # in the tree bottom-up, lest disabling execute permission from
- # the top down get in the way of being able to get at lower
- # parts of the tree. But os.path.walk() visits things top
- # down, so we just use an object to collect a list of all
- # of the entries in the tree, reverse the list, and then
- # chmod the reversed (bottom-up) list.
- col = Collector(top)
- os.path.walk(top, col, None)
- col.entries.reverse()
- for d in col.entries: do_chmod(d)
-
- def write(self, file, content, mode = 'wb'):
- """Writes the specified content text (second argument) to the
- specified file name (first argument). The file name may be
- a list, in which case the elements are concatenated with the
- os.path.join() method. The file is created under the temporary
- working directory. Any subdirectories in the path must already
- exist. The I/O mode for the file may be specified; it must
- begin with a 'w'. The default is 'wb' (binary write).
- """
- file = self.canonicalize(file)
- if mode[0] != 'w':
- raise ValueError, "mode must begin with 'w'"
- with open(file, mode) as f:
- f.write(content)
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
+++ /dev/null
-"""
-TestCommon.py: a testing framework for commands and scripts
- with commonly useful error handling
-
-The TestCommon module provides a simple, high-level interface for writing
-tests of executable commands and scripts, especially commands and scripts
-that interact with the file system. All methods throw exceptions and
-exit on failure, with useful error messages. This makes a number of
-explicit checks unnecessary, making the test scripts themselves simpler
-to write and easier to read.
-
-The TestCommon class is a subclass of the TestCmd class. In essence,
-TestCommon is a wrapper that handles common TestCmd error conditions in
-useful ways. You can use TestCommon directly, or subclass it for your
-program and add additional (or override) methods to tailor it to your
-program's specific needs. Alternatively, the TestCommon class serves
-as a useful example of how to define your own TestCmd subclass.
-
-As a subclass of TestCmd, TestCommon provides access to all of the
-variables and methods from the TestCmd module. Consequently, you can
-use any variable or method documented in the TestCmd module without
-having to explicitly import TestCmd.
-
-A TestCommon environment object is created via the usual invocation:
-
- import TestCommon
- test = TestCommon.TestCommon()
-
-You can use all of the TestCmd keyword arguments when instantiating a
-TestCommon object; see the TestCmd documentation for details.
-
-Here is an overview of the methods and keyword arguments that are
-provided by the TestCommon class:
-
- test.must_be_writable('file1', ['file2', ...])
-
- test.must_contain('file', 'required text\n')
-
- test.must_contain_all_lines(output, lines, ['title', find])
-
- test.must_contain_any_line(output, lines, ['title', find])
-
- test.must_exist('file1', ['file2', ...])
-
- test.must_match('file', "expected contents\n")
-
- test.must_not_be_writable('file1', ['file2', ...])
-
- test.must_not_contain('file', 'banned text\n')
-
- test.must_not_contain_any_line(output, lines, ['title', find])
-
- test.must_not_exist('file1', ['file2', ...])
-
- test.run(options = "options to be prepended to arguments",
- stdout = "expected standard output from the program",
- stderr = "expected error output from the program",
- status = expected_status,
- match = match_function)
-
-The TestCommon module also provides the following variables
-
- TestCommon.python_executable
- TestCommon.exe_suffix
- TestCommon.obj_suffix
- TestCommon.shobj_prefix
- TestCommon.shobj_suffix
- TestCommon.lib_prefix
- TestCommon.lib_suffix
- TestCommon.dll_prefix
- TestCommon.dll_suffix
-
-"""
-
-# Copyright 2000-2010 Steven Knight
-# This module is free software, and you may redistribute it and/or modify
-# it under the same terms as Python itself, so long as this copyright message
-# and disclaimer are retained in their original form.
-#
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
-# THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-# DAMAGE.
-#
-# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-# PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
-# AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
-# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-__author__ = "Steven Knight <knight at baldmt dot com>"
-__revision__ = "TestCommon.py 0.37.D001 2010/01/11 16:55:50 knight"
-__version__ = "0.37"
-
-import copy
-import os
-import os.path
-import stat
-import string
-import sys
-import types
-import UserList
-
-from TestCmd import *
-from TestCmd import __all__
-
-__all__.extend([ 'TestCommon',
- 'exe_suffix',
- 'obj_suffix',
- 'shobj_prefix',
- 'shobj_suffix',
- 'lib_prefix',
- 'lib_suffix',
- 'dll_prefix',
- 'dll_suffix',
- ])
-
-# Variables that describe the prefixes and suffixes on this system.
-if sys.platform == 'win32':
- exe_suffix = '.exe'
- obj_suffix = '.obj'
- shobj_suffix = '.obj'
- shobj_prefix = ''
- lib_prefix = ''
- lib_suffix = '.lib'
- dll_prefix = ''
- dll_suffix = '.dll'
-elif sys.platform == 'cygwin':
- exe_suffix = '.exe'
- obj_suffix = '.o'
- shobj_suffix = '.os'
- shobj_prefix = ''
- lib_prefix = 'lib'
- lib_suffix = '.a'
- dll_prefix = ''
- dll_suffix = '.dll'
-elif string.find(sys.platform, 'irix') != -1:
- exe_suffix = ''
- obj_suffix = '.o'
- shobj_suffix = '.o'
- shobj_prefix = ''
- lib_prefix = 'lib'
- lib_suffix = '.a'
- dll_prefix = 'lib'
- dll_suffix = '.so'
-elif string.find(sys.platform, 'darwin') != -1:
- exe_suffix = ''
- obj_suffix = '.o'
- shobj_suffix = '.os'
- shobj_prefix = ''
- lib_prefix = 'lib'
- lib_suffix = '.a'
- dll_prefix = 'lib'
- dll_suffix = '.dylib'
-elif string.find(sys.platform, 'sunos') != -1:
- exe_suffix = ''
- obj_suffix = '.o'
- shobj_suffix = '.os'
- shobj_prefix = 'so_'
- lib_prefix = 'lib'
- lib_suffix = '.a'
- dll_prefix = 'lib'
- dll_suffix = '.dylib'
-else:
- exe_suffix = ''
- obj_suffix = '.o'
- shobj_suffix = '.os'
- shobj_prefix = ''
- lib_prefix = 'lib'
- lib_suffix = '.a'
- dll_prefix = 'lib'
- dll_suffix = '.so'
-
-def is_List(e):
- return type(e) is types.ListType \
- or isinstance(e, UserList.UserList)
-
-def is_writable(f):
- mode = os.stat(f)[stat.ST_MODE]
- return mode & stat.S_IWUSR
-
-def separate_files(flist):
- existing = []
- missing = []
- for f in flist:
- if os.path.exists(f):
- existing.append(f)
- else:
- missing.append(f)
- return existing, missing
-
-def _failed(self, status = 0):
- if self.status is None or status is None:
- return None
- try:
- return _status(self) not in status
- except TypeError:
- # status wasn't an iterable
- return _status(self) != status
-
-def _status(self):
- return self.status
-
-class TestCommon(TestCmd):
-
- # Additional methods from the Perl Test::Cmd::Common module
- # that we may wish to add in the future:
- #
- # $test->subdir('subdir', ...);
- #
- # $test->copy('src_file', 'dst_file');
-
- def __init__(self, **kw):
- """Initialize a new TestCommon instance. This involves just
- calling the base class initialization, and then changing directory
- to the workdir.
- """
- apply(TestCmd.__init__, [self], kw)
- os.chdir(self.workdir)
-
- def must_be_writable(self, *files):
- """Ensures that the specified file(s) exist and are writable.
- An individual file can be specified as a list of directory names,
- in which case the pathname will be constructed by concatenating
- them. Exits FAILED if any of the files does not exist or is
- not writable.
- """
- files = map(lambda x: is_List(x) and apply(os.path.join, x) or x, files)
- existing, missing = separate_files(files)
- unwritable = filter(lambda x, iw=is_writable: not iw(x), existing)
- if missing:
- print "Missing files: `%s'" % string.join(missing, "', `")
- if unwritable:
- print "Unwritable files: `%s'" % string.join(unwritable, "', `")
- self.fail_test(missing + unwritable)
-
- def must_contain(self, file, required, mode = 'rb'):
- """Ensures that the specified file contains the required text.
- """
- file_contents = self.read(file, mode)
- contains = (string.find(file_contents, required) != -1)
- if not contains:
- print "File `%s' does not contain required string." % file
- print self.banner('Required string ')
- print required
- print self.banner('%s contents ' % file)
- print file_contents
- self.fail_test(not contains)
-
- def must_contain_all_lines(self, output, lines, title=None, find=None):
- """Ensures that the specified output string (first argument)
- contains all of the specified lines (second argument).
-
- An optional third argument can be used to describe the type
- of output being searched, and only shows up in failure output.
-
- An optional fourth argument can be used to supply a different
- function, of the form "find(line, output), to use when searching
- for lines in the output.
- """
- if find is None:
- find = lambda o, l: string.find(o, l) != -1
- missing = []
- for line in lines:
- if not find(output, line):
- missing.append(line)
-
- if missing:
- if title is None:
- title = 'output'
- sys.stdout.write("Missing expected lines from %s:\n" % title)
- for line in missing:
- sys.stdout.write(' ' + repr(line) + '\n')
- sys.stdout.write(self.banner(title + ' '))
- sys.stdout.write(output)
- self.fail_test()
-
- def must_contain_any_line(self, output, lines, title=None, find=None):
- """Ensures that the specified output string (first argument)
- contains at least one of the specified lines (second argument).
-
- An optional third argument can be used to describe the type
- of output being searched, and only shows up in failure output.
-
- An optional fourth argument can be used to supply a different
- function, of the form "find(line, output), to use when searching
- for lines in the output.
- """
- if find is None:
- find = lambda o, l: string.find(o, l) != -1
- for line in lines:
- if find(output, line):
- return
-
- if title is None:
- title = 'output'
- sys.stdout.write("Missing any expected line from %s:\n" % title)
- for line in lines:
- sys.stdout.write(' ' + repr(line) + '\n')
- sys.stdout.write(self.banner(title + ' '))
- sys.stdout.write(output)
- self.fail_test()
-
- def must_contain_lines(self, lines, output, title=None):
- # Deprecated; retain for backwards compatibility.
- return self.must_contain_all_lines(output, lines, title)
-
- def must_exist(self, *files):
- """Ensures that the specified file(s) must exist. An individual
- file be specified as a list of directory names, in which case the
- pathname will be constructed by concatenating them. Exits FAILED
- if any of the files does not exist.
- """
- files = map(lambda x: is_List(x) and apply(os.path.join, x) or x, files)
- missing = filter(lambda x: not os.path.exists(x), files)
- if missing:
- print "Missing files: `%s'" % string.join(missing, "', `")
- self.fail_test(missing)
-
- def must_match(self, file, expect, mode = 'rb'):
- """Matches the contents of the specified file (first argument)
- against the expected contents (second argument). The expected
- contents are a list of lines or a string which will be split
- on newlines.
- """
- file_contents = self.read(file, mode)
- try:
- self.fail_test(not self.match(file_contents, expect))
- except KeyboardInterrupt:
- raise
- except:
- print "Unexpected contents of `%s'" % file
- self.diff(expect, file_contents, 'contents ')
- raise
-
- def must_not_contain(self, file, banned, mode = 'rb'):
- """Ensures that the specified file doesn't contain the banned text.
- """
- file_contents = self.read(file, mode)
- contains = (string.find(file_contents, banned) != -1)
- if contains:
- print "File `%s' contains banned string." % file
- print self.banner('Banned string ')
- print banned
- print self.banner('%s contents ' % file)
- print file_contents
- self.fail_test(contains)
-
- def must_not_contain_any_line(self, output, lines, title=None, find=None):
- """Ensures that the specified output string (first argument)
- does not contain any of the specified lines (second argument).
-
- An optional third argument can be used to describe the type
- of output being searched, and only shows up in failure output.
-
- An optional fourth argument can be used to supply a different
- function, of the form "find(line, output), to use when searching
- for lines in the output.
- """
- if find is None:
- find = lambda o, l: string.find(o, l) != -1
- unexpected = []
- for line in lines:
- if find(output, line):
- unexpected.append(line)
-
- if unexpected:
- if title is None:
- title = 'output'
- sys.stdout.write("Unexpected lines in %s:\n" % title)
- for line in unexpected:
- sys.stdout.write(' ' + repr(line) + '\n')
- sys.stdout.write(self.banner(title + ' '))
- sys.stdout.write(output)
- self.fail_test()
-
- def must_not_contain_lines(self, lines, output, title=None):
- return self.must_not_contain_any_line(output, lines, title)
-
- def must_not_exist(self, *files):
- """Ensures that the specified file(s) must not exist.
- An individual file be specified as a list of directory names, in
- which case the pathname will be constructed by concatenating them.
- Exits FAILED if any of the files exists.
- """
- files = map(lambda x: is_List(x) and apply(os.path.join, x) or x, files)
- existing = filter(os.path.exists, files)
- if existing:
- print "Unexpected files exist: `%s'" % string.join(existing, "', `")
- self.fail_test(existing)
-
- def must_not_be_writable(self, *files):
- """Ensures that the specified file(s) exist and are not writable.
- An individual file can be specified as a list of directory names,
- in which case the pathname will be constructed by concatenating
- them. Exits FAILED if any of the files does not exist or is
- writable.
- """
- files = map(lambda x: is_List(x) and apply(os.path.join, x) or x, files)
- existing, missing = separate_files(files)
- writable = filter(is_writable, existing)
- if missing:
- print "Missing files: `%s'" % string.join(missing, "', `")
- if writable:
- print "Writable files: `%s'" % string.join(writable, "', `")
- self.fail_test(missing + writable)
-
- def _complete(self, actual_stdout, expected_stdout,
- actual_stderr, expected_stderr, status, match):
- """
- Post-processes running a subcommand, checking for failure
- status and displaying output appropriately.
- """
- if _failed(self, status):
- expect = ''
- if status != 0:
- expect = " (expected %s)" % str(status)
- print "%s returned %s%s" % (self.program, str(_status(self)), expect)
- print self.banner('STDOUT ')
- print actual_stdout
- print self.banner('STDERR ')
- print actual_stderr
- self.fail_test()
- if not expected_stdout is None and not match(actual_stdout, expected_stdout):
- self.diff(expected_stdout, actual_stdout, 'STDOUT ')
- if actual_stderr:
- print self.banner('STDERR ')
- print actual_stderr
- self.fail_test()
- if not expected_stderr is None and not match(actual_stderr, expected_stderr):
- print self.banner('STDOUT ')
- print actual_stdout
- self.diff(expected_stderr, actual_stderr, 'STDERR ')
- self.fail_test()
-
- def start(self, program = None,
- interpreter = None,
- arguments = None,
- universal_newlines = None,
- **kw):
- """
- Starts a program or script for the test environment.
-
- This handles the "options" keyword argument and exceptions.
- """
- options = kw.pop('options', None)
- if options:
- if arguments is None:
- arguments = options
- else:
- arguments = options + " " + arguments
-
- try:
- return apply(TestCmd.start,
- (self, program, interpreter, arguments, universal_newlines),
- kw)
- except KeyboardInterrupt:
- raise
- except Exception, e:
- print self.banner('STDOUT ')
- try:
- print self.stdout()
- except IndexError:
- pass
- print self.banner('STDERR ')
- try:
- print self.stderr()
- except IndexError:
- pass
- cmd_args = self.command_args(program, interpreter, arguments)
- sys.stderr.write('Exception trying to execute: %s\n' % cmd_args)
- raise e
-
- def finish(self, popen, stdout = None, stderr = '', status = 0, **kw):
- """
- Finishes and waits for the process being run under control of
- the specified popen argument. Additional arguments are similar
- to those of the run() method:
-
- stdout The expected standard output from
- the command. A value of None means
- don't test standard output.
-
- stderr The expected error output from
- the command. A value of None means
- don't test error output.
-
- status The expected exit status from the
- command. A value of None means don't
- test exit status.
- """
- apply(TestCmd.finish, (self, popen,), kw)
- match = kw.get('match', self.match)
- self._complete(self.stdout(), stdout,
- self.stderr(), stderr, status, match)
-
- def run(self, options = None, arguments = None,
- stdout = None, stderr = '', status = 0, **kw):
- """Runs the program under test, checking that the test succeeded.
-
- The arguments are the same as the base TestCmd.run() method,
- with the addition of:
-
- options Extra options that get appended to the beginning
- of the arguments.
-
- stdout The expected standard output from
- the command. A value of None means
- don't test standard output.
-
- stderr The expected error output from
- the command. A value of None means
- don't test error output.
-
- status The expected exit status from the
- command. A value of None means don't
- test exit status.
-
- By default, this expects a successful exit (status = 0), does
- not test standard output (stdout = None), and expects that error
- output is empty (stderr = "").
- """
- if options:
- if arguments is None:
- arguments = options
- else:
- arguments = options + " " + arguments
- kw['arguments'] = arguments
- match = kw.pop('match', self.match)
- apply(TestCmd.run, [self], kw)
- self._complete(self.stdout(), stdout,
- self.stderr(), stderr, status, match)
-
- def skip_test(self, message="Skipping test.\n"):
- """Skips a test.
-
- Proper test-skipping behavior is dependent on the external
- TESTCOMMON_PASS_SKIPS environment variable. If set, we treat
- the skip as a PASS (exit 0), and otherwise treat it as NO RESULT.
- In either case, we print the specified message as an indication
- that the substance of the test was skipped.
-
- (This was originally added to support development under Aegis.
- Technically, skipping a test is a NO RESULT, but Aegis would
- treat that as a test failure and prevent the change from going to
- the next step. Since we ddn't want to force anyone using Aegis
- to have to install absolutely every tool used by the tests, we
- would actually report to Aegis that a skipped test has PASSED
- so that the workflow isn't held up.)
- """
- if message:
- sys.stdout.write(message)
- sys.stdout.flush()
- pass_skips = os.environ.get('TESTCOMMON_PASS_SKIPS')
- if pass_skips in [None, 0, '0']:
- # skip=1 means skip this function when showing where this
- # result came from. They only care about the line where the
- # script called test.skip_test(), not the line number where
- # we call test.no_result().
- self.no_result(skip=1)
- else:
- # We're under the development directory for this change,
- # so this is an Aegis invocation; pass the test (exit 0).
- self.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-TestGyp.py: a testing framework for GYP integration tests.
-"""
-
-import os
-import re
-import shutil
-import stat
-import subprocess
-import sys
-import tempfile
-
-import TestCommon
-from TestCommon import __all__
-
-__all__.extend([
- 'TestGyp',
-])
-
-def remove_debug_line_numbers(contents):
- """Function to remove the line numbers from the debug output
- of gyp and thus remove the exremem fragility of the stdout
- comparison tests.
- """
- lines = contents.splitlines()
- # split each line on ":"
- lines = [l.split(":", 3) for l in lines]
- # join each line back together while ignoring the
- # 3rd column which is the line number
- lines = [len(l) > 3 and ":".join(l[3:]) or l for l in lines]
- return "\n".join(lines)
-
-def match_modulo_line_numbers(contents_a, contents_b):
- """File contents matcher that ignores line numbers."""
- contents_a = remove_debug_line_numbers(contents_a)
- contents_b = remove_debug_line_numbers(contents_b)
- return TestCommon.match_exact(contents_a, contents_b)
-
-class TestGypBase(TestCommon.TestCommon):
- """
- Class for controlling end-to-end tests of gyp generators.
-
- Instantiating this class will create a temporary directory and
- arrange for its destruction (via the TestCmd superclass) and
- copy all of the non-gyptest files in the directory hierarchy of the
- executing script.
-
- The default behavior is to test the 'gyp' or 'gyp.bat' file in the
- current directory. An alternative may be specified explicitly on
- instantiation, or by setting the TESTGYP_GYP environment variable.
-
- This class should be subclassed for each supported gyp generator
- (format). Various abstract methods below define calling signatures
- used by the test scripts to invoke builds on the generated build
- configuration and to run executables generated by those builds.
- """
-
- build_tool = None
- build_tool_list = []
-
- _exe = TestCommon.exe_suffix
- _obj = TestCommon.obj_suffix
- shobj_ = TestCommon.shobj_prefix
- _shobj = TestCommon.shobj_suffix
- lib_ = TestCommon.lib_prefix
- _lib = TestCommon.lib_suffix
- dll_ = TestCommon.dll_prefix
- _dll = TestCommon.dll_suffix
-
- # Constants to represent different targets.
- ALL = '__all__'
- DEFAULT = '__default__'
-
- # Constants for different target types.
- EXECUTABLE = '__executable__'
- STATIC_LIB = '__static_lib__'
- SHARED_LIB = '__shared_lib__'
-
- def __init__(self, gyp=None, *args, **kw):
- self.origin_cwd = os.path.abspath(os.path.dirname(sys.argv[0]))
- self.extra_args = sys.argv[1:]
-
- if not gyp:
- gyp = os.environ.get('TESTGYP_GYP')
- if not gyp:
- if sys.platform == 'win32':
- gyp = 'gyp.bat'
- else:
- gyp = 'gyp'
- self.gyp = os.path.abspath(gyp)
-
- self.initialize_build_tool()
-
- kw.setdefault('match', TestCommon.match_exact)
-
- # Put test output in out/testworkarea by default.
- # Use temporary names so there are no collisions.
- workdir = os.path.join('out', kw.get('workdir', 'testworkarea'))
- # Create work area if it doesn't already exist.
- if not os.path.isdir(workdir):
- os.makedirs(workdir)
-
- kw['workdir'] = tempfile.mktemp(prefix='testgyp.', dir=workdir)
-
- formats = kw.pop('formats', [])
-
- super(TestGypBase, self).__init__(*args, **kw)
-
- excluded_formats = set([f for f in formats if f[0] == '!'])
- included_formats = set(formats) - excluded_formats
- if ('!'+self.format in excluded_formats or
- included_formats and self.format not in included_formats):
- msg = 'Invalid test for %r format; skipping test.\n'
- self.skip_test(msg % self.format)
-
- self.copy_test_configuration(self.origin_cwd, self.workdir)
- self.set_configuration(None)
-
- # Set $HOME so that gyp doesn't read the user's actual
- # ~/.gyp/include.gypi file, which may contain variables
- # and other settings that would change the output.
- os.environ['HOME'] = self.workpath()
- # Clear $GYP_DEFINES for the same reason.
- if 'GYP_DEFINES' in os.environ:
- del os.environ['GYP_DEFINES']
-
- def built_file_must_exist(self, name, type=None, **kw):
- """
- Fails the test if the specified built file name does not exist.
- """
- return self.must_exist(self.built_file_path(name, type, **kw))
-
- def built_file_must_not_exist(self, name, type=None, **kw):
- """
- Fails the test if the specified built file name exists.
- """
- return self.must_not_exist(self.built_file_path(name, type, **kw))
-
- def built_file_must_match(self, name, contents, **kw):
- """
- Fails the test if the contents of the specified built file name
- do not match the specified contents.
- """
- return self.must_match(self.built_file_path(name, **kw), contents)
-
- def built_file_must_not_match(self, name, contents, **kw):
- """
- Fails the test if the contents of the specified built file name
- match the specified contents.
- """
- return self.must_not_match(self.built_file_path(name, **kw), contents)
-
- def copy_test_configuration(self, source_dir, dest_dir):
- """
- Copies the test configuration from the specified source_dir
- (the directory in which the test script lives) to the
- specified dest_dir (a temporary working directory).
-
- This ignores all files and directories that begin with
- the string 'gyptest', and all '.svn' subdirectories.
- """
- for root, dirs, files in os.walk(source_dir):
- if '.svn' in dirs:
- dirs.remove('.svn')
- dirs = [ d for d in dirs if not d.startswith('gyptest') ]
- files = [ f for f in files if not f.startswith('gyptest') ]
- for dirname in dirs:
- source = os.path.join(root, dirname)
- destination = source.replace(source_dir, dest_dir)
- os.mkdir(destination)
- if sys.platform != 'win32':
- shutil.copystat(source, destination)
- for filename in files:
- source = os.path.join(root, filename)
- destination = source.replace(source_dir, dest_dir)
- shutil.copy2(source, destination)
-
- def initialize_build_tool(self):
- """
- Initializes the .build_tool attribute.
-
- Searches the .build_tool_list for an executable name on the user's
- $PATH. The first tool on the list is used as-is if nothing is found
- on the current $PATH.
- """
- for build_tool in self.build_tool_list:
- if not build_tool:
- continue
- if os.path.isabs(build_tool):
- self.build_tool = build_tool
- return
- build_tool = self.where_is(build_tool)
- if build_tool:
- self.build_tool = build_tool
- return
-
- if self.build_tool_list:
- self.build_tool = self.build_tool_list[0]
-
- def relocate(self, source, destination):
- """
- Renames (relocates) the specified source (usually a directory)
- to the specified destination, creating the destination directory
- first if necessary.
-
- Note: Don't use this as a generic "rename" operation. In the
- future, "relocating" parts of a GYP tree may affect the state of
- the test to modify the behavior of later method calls.
- """
- destination_dir = os.path.dirname(destination)
- if not os.path.exists(destination_dir):
- self.subdir(destination_dir)
- os.rename(source, destination)
-
- def report_not_up_to_date(self):
- """
- Reports that a build is not up-to-date.
-
- This provides common reporting for formats that have complicated
- conditions for checking whether a build is up-to-date. Formats
- that expect exact output from the command (make, scons) can
- just set stdout= when they call the run_build() method.
- """
- print "Build is not up-to-date:"
- print self.banner('STDOUT ')
- print self.stdout()
- stderr = self.stderr()
- if stderr:
- print self.banner('STDERR ')
- print stderr
-
- def run_gyp(self, gyp_file, *args, **kw):
- """
- Runs gyp against the specified gyp_file with the specified args.
- """
-
- # When running gyp, and comparing its output we use a comparitor
- # that ignores the line numbers that gyp logs in its debug output.
- if kw.pop('ignore_line_numbers', False):
- kw.setdefault('match', match_modulo_line_numbers)
-
- # TODO: --depth=. works around Chromium-specific tree climbing.
- depth = kw.pop('depth', '.')
- run_args = ['--depth='+depth, '--format='+self.format, gyp_file]
- run_args.extend(self.extra_args)
- run_args.extend(args)
- return self.run(program=self.gyp, arguments=run_args, **kw)
-
- def run(self, *args, **kw):
- """
- Executes a program by calling the superclass .run() method.
-
- This exists to provide a common place to filter out keyword
- arguments implemented in this layer, without having to update
- the tool-specific subclasses or clutter the tests themselves
- with platform-specific code.
- """
- if kw.has_key('SYMROOT'):
- del kw['SYMROOT']
- super(TestGypBase, self).run(*args, **kw)
-
- def set_configuration(self, configuration):
- """
- Sets the configuration, to be used for invoking the build
- tool and testing potential built output.
- """
- self.configuration = configuration
-
- def configuration_dirname(self):
- if self.configuration:
- return self.configuration.split('|')[0]
- else:
- return 'Default'
-
- def configuration_buildname(self):
- if self.configuration:
- return self.configuration
- else:
- return 'Default'
-
- #
- # Abstract methods to be defined by format-specific subclasses.
- #
-
- def build(self, gyp_file, target=None, **kw):
- """
- Runs a build of the specified target against the configuration
- generated from the specified gyp_file.
-
- A 'target' argument of None or the special value TestGyp.DEFAULT
- specifies the default argument for the underlying build tool.
- A 'target' argument of TestGyp.ALL specifies the 'all' target
- (if any) of the underlying build tool.
- """
- raise NotImplementedError
-
- def built_file_path(self, name, type=None, **kw):
- """
- Returns a path to the specified file name, of the specified type.
- """
- raise NotImplementedError
-
- def built_file_basename(self, name, type=None, **kw):
- """
- Returns the base name of the specified file name, of the specified type.
-
- A bare=True keyword argument specifies that prefixes and suffixes shouldn't
- be applied.
- """
- if not kw.get('bare'):
- if type == self.EXECUTABLE:
- name = name + self._exe
- elif type == self.STATIC_LIB:
- name = self.lib_ + name + self._lib
- elif type == self.SHARED_LIB:
- name = self.dll_ + name + self._dll
- return name
-
- def run_built_executable(self, name, *args, **kw):
- """
- Runs an executable program built from a gyp-generated configuration.
-
- The specified name should be independent of any particular generator.
- Subclasses should find the output executable in the appropriate
- output build directory, tack on any necessary executable suffix, etc.
- """
- raise NotImplementedError
-
- def up_to_date(self, gyp_file, target=None, **kw):
- """
- Verifies that a build of the specified target is up to date.
-
- The subclass should implement this by calling build()
- (or a reasonable equivalent), checking whatever conditions
- will tell it the build was an "up to date" null build, and
- failing if it isn't.
- """
- raise NotImplementedError
-
-
-class TestGypGypd(TestGypBase):
- """
- Subclass for testing the GYP 'gypd' generator (spit out the
- internal data structure as pretty-printed Python).
- """
- format = 'gypd'
-
-
-class TestGypCustom(TestGypBase):
- """
- Subclass for testing the GYP with custom generator
- """
-
- def __init__(self, gyp=None, *args, **kw):
- self.format = kw.pop("format")
- super(TestGypCustom, self).__init__(*args, **kw)
-
-
-class TestGypAndroid(TestGypBase):
- """
- Subclass for testing the GYP Android makefile generator. Note that
- build/envsetup.sh and lunch must have been run before running tests.
-
- TODO: This is currently an incomplete implementation. We do not support
- run_built_executable(), so we pass only tests which do not use this. As a
- result, support for host targets is not properly tested.
- """
- format = 'android'
-
- # Note that we can't use mmm as the build tool because ...
- # - it builds all targets, whereas we need to pass a target
- # - it is a function, whereas the test runner assumes the build tool is a file
- # Instead we use make and duplicate the logic from mmm.
- build_tool_list = ['make']
-
- # We use our custom target 'gyp_all_modules', as opposed to the 'all_modules'
- # target used by mmm, to build only those targets which are part of the gyp
- # target 'all'.
- ALL = 'gyp_all_modules'
-
- def __init__(self, gyp=None, *args, **kw):
- # Android requires build and test output to be outside its source tree.
- # We use the following working directory for the test's source, but the
- # test's build output still goes to $ANDROID_PRODUCT_OUT.
- # Note that some tests explicitly set format='gypd' to invoke the gypd
- # backend. This writes to the source tree, but there's no way around this.
- kw['workdir'] = os.path.join('/tmp', 'gyptest',
- kw.get('workdir', 'testworkarea'))
- # We need to remove all gyp outputs from out/. Ths is because some tests
- # don't have rules to regenerate output, so they will simply re-use stale
- # output if present. Since the test working directory gets regenerated for
- # each test run, this can confuse things.
- # We don't have a list of build outputs because we don't know which
- # dependent targets were built. Instead we delete all gyp-generated output.
- # This may be excessive, but should be safe.
- out_dir = os.environ['ANDROID_PRODUCT_OUT']
- obj_dir = os.path.join(out_dir, 'obj')
- shutil.rmtree(os.path.join(obj_dir, 'GYP'), ignore_errors = True)
- for x in ['EXECUTABLES', 'STATIC_LIBRARIES', 'SHARED_LIBRARIES']:
- for d in os.listdir(os.path.join(obj_dir, x)):
- if d.endswith('_gyp_intermediates'):
- shutil.rmtree(os.path.join(obj_dir, x, d), ignore_errors = True)
- for x in [os.path.join('obj', 'lib'), os.path.join('system', 'lib')]:
- for d in os.listdir(os.path.join(out_dir, x)):
- if d.endswith('_gyp.so'):
- os.remove(os.path.join(out_dir, x, d))
-
- super(TestGypAndroid, self).__init__(*args, **kw)
-
- def target_name(self, target):
- if target == self.ALL:
- return self.ALL
- # The default target is 'droid'. However, we want to use our special target
- # to build only the gyp target 'all'.
- if target in (None, self.DEFAULT):
- return self.ALL
- return target
-
- def build(self, gyp_file, target=None, **kw):
- """
- Runs a build using the Android makefiles generated from the specified
- gyp_file. This logic is taken from Android's mmm.
- """
- arguments = kw.get('arguments', [])[:]
- arguments.append(self.target_name(target))
- arguments.append('-C')
- arguments.append(os.environ['ANDROID_BUILD_TOP'])
- kw['arguments'] = arguments
- chdir = kw.get('chdir', '')
- makefile = os.path.join(self.workdir, chdir, 'GypAndroid.mk')
- os.environ['ONE_SHOT_MAKEFILE'] = makefile
- result = self.run(program=self.build_tool, **kw)
- del os.environ['ONE_SHOT_MAKEFILE']
- return result
-
- def android_module(self, group, name, subdir):
- if subdir:
- name = '%s_%s' % (subdir, name)
- if group == 'SHARED_LIBRARIES':
- name = 'lib_%s' % name
- return '%s_gyp' % name
-
- def intermediates_dir(self, group, module_name):
- return os.path.join(os.environ['ANDROID_PRODUCT_OUT'], 'obj', group,
- '%s_intermediates' % module_name)
-
- def built_file_path(self, name, type=None, **kw):
- """
- Returns a path to the specified file name, of the specified type,
- as built by Android. Note that we don't support the configuration
- parameter.
- """
- # Built files are in $ANDROID_PRODUCT_OUT. This requires copying logic from
- # the Android build system.
- if type == None:
- return os.path.join(os.environ['ANDROID_PRODUCT_OUT'], 'obj', 'GYP',
- 'shared_intermediates', name)
- subdir = kw.get('subdir')
- if type == self.EXECUTABLE:
- # We don't install executables
- group = 'EXECUTABLES'
- module_name = self.android_module(group, name, subdir)
- return os.path.join(self.intermediates_dir(group, module_name), name)
- if type == self.STATIC_LIB:
- group = 'STATIC_LIBRARIES'
- module_name = self.android_module(group, name, subdir)
- return os.path.join(self.intermediates_dir(group, module_name),
- '%s.a' % module_name)
- if type == self.SHARED_LIB:
- group = 'SHARED_LIBRARIES'
- module_name = self.android_module(group, name, subdir)
- return os.path.join(self.intermediates_dir(group, module_name), 'LINKED',
- '%s.so' % module_name)
- assert False, 'Unhandled type'
-
- def run_built_executable(self, name, *args, **kw):
- """
- Runs an executable program built from a gyp-generated configuration.
-
- This is not correctly implemented for Android. For now, we simply check
- that the executable file exists.
- """
- # Running executables requires a device. Even if we build for target x86,
- # the binary is not built with the correct toolchain options to actually
- # run on the host.
-
- # Copied from TestCommon.run()
- match = kw.pop('match', self.match)
- status = None
- if os.path.exists(self.built_file_path(name)):
- status = 1
- self._complete(None, None, None, None, status, self.match)
-
- def match_single_line(self, lines = None, expected_line = None):
- """
- Checks that specified line appears in the text.
- """
- for line in lines.split('\n'):
- if line == expected_line:
- return 1
- return
-
- def up_to_date(self, gyp_file, target=None, **kw):
- """
- Verifies that a build of the specified target is up to date.
- """
- kw['stdout'] = ("make: Nothing to be done for `%s'." %
- self.target_name(target))
-
- # We need to supply a custom matcher, since we don't want to depend on the
- # exact stdout string.
- kw['match'] = self.match_single_line
- return self.build(gyp_file, target, **kw)
-
-class TestGypMake(TestGypBase):
- """
- Subclass for testing the GYP Make generator.
- """
- format = 'make'
- build_tool_list = ['make']
- ALL = 'all'
- def build(self, gyp_file, target=None, **kw):
- """
- Runs a Make build using the Makefiles generated from the specified
- gyp_file.
- """
- arguments = kw.get('arguments', [])[:]
- if self.configuration:
- arguments.append('BUILDTYPE=' + self.configuration)
- if target not in (None, self.DEFAULT):
- arguments.append(target)
- # Sub-directory builds provide per-gyp Makefiles (i.e.
- # Makefile.gyp_filename), so use that if there is no Makefile.
- chdir = kw.get('chdir', '')
- if not os.path.exists(os.path.join(chdir, 'Makefile')):
- print "NO Makefile in " + os.path.join(chdir, 'Makefile')
- arguments.insert(0, '-f')
- arguments.insert(1, os.path.splitext(gyp_file)[0] + '.Makefile')
- kw['arguments'] = arguments
- return self.run(program=self.build_tool, **kw)
- def up_to_date(self, gyp_file, target=None, **kw):
- """
- Verifies that a build of the specified Make target is up to date.
- """
- if target in (None, self.DEFAULT):
- message_target = 'all'
- else:
- message_target = target
- kw['stdout'] = "make: Nothing to be done for `%s'.\n" % message_target
- return self.build(gyp_file, target, **kw)
- def run_built_executable(self, name, *args, **kw):
- """
- Runs an executable built by Make.
- """
- configuration = self.configuration_dirname()
- libdir = os.path.join('out', configuration, 'lib')
- # TODO(piman): when everything is cross-compile safe, remove lib.target
- if sys.platform == 'darwin':
- # Mac puts target shared libraries right in the product directory.
- configuration = self.configuration_dirname()
- os.environ['DYLD_LIBRARY_PATH'] = (
- libdir + '.host:' + os.path.join('out', configuration))
- else:
- os.environ['LD_LIBRARY_PATH'] = libdir + '.host:' + libdir + '.target'
- # Enclosing the name in a list avoids prepending the original dir.
- program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)]
- return self.run(program=program, *args, **kw)
- def built_file_path(self, name, type=None, **kw):
- """
- Returns a path to the specified file name, of the specified type,
- as built by Make.
-
- Built files are in the subdirectory 'out/{configuration}'.
- The default is 'out/Default'.
-
- A chdir= keyword argument specifies the source directory
- relative to which the output subdirectory can be found.
-
- "type" values of STATIC_LIB or SHARED_LIB append the necessary
- prefixes and suffixes to a platform-independent library base name.
-
- A subdir= keyword argument specifies a library subdirectory within
- the default 'obj.target'.
- """
- result = []
- chdir = kw.get('chdir')
- if chdir:
- result.append(chdir)
- configuration = self.configuration_dirname()
- result.extend(['out', configuration])
- if type == self.STATIC_LIB and sys.platform != 'darwin':
- result.append('obj.target')
- elif type == self.SHARED_LIB and sys.platform != 'darwin':
- result.append('lib.target')
- subdir = kw.get('subdir')
- if subdir and type != self.SHARED_LIB:
- result.append(subdir)
- result.append(self.built_file_basename(name, type, **kw))
- return self.workpath(*result)
-
-
-def ConvertToCygpath(path):
- """Convert to cygwin path if we are using cygwin."""
- if sys.platform == 'cygwin':
- p = subprocess.Popen(['cygpath', path], stdout=subprocess.PIPE)
- path = p.communicate()[0].strip()
- return path
-
-
-def FindVisualStudioInstallation():
- """Returns appropriate values for .build_tool and .uses_msbuild fields
- of TestGypBase for Visual Studio.
-
- We use the value specified by GYP_MSVS_VERSION. If not specified, we
- search %PATH% and %PATHEXT% for a devenv.{exe,bat,...} executable.
- Failing that, we search for likely deployment paths.
- """
- possible_roots = ['%s:\\Program Files%s' % (chr(drive), suffix)
- for drive in range(ord('C'), ord('Z') + 1)
- for suffix in ['', ' (x86)']]
- possible_paths = {
- '2012': r'Microsoft Visual Studio 11.0\Common7\IDE\devenv.com',
- '2010': r'Microsoft Visual Studio 10.0\Common7\IDE\devenv.com',
- '2008': r'Microsoft Visual Studio 9.0\Common7\IDE\devenv.com',
- '2005': r'Microsoft Visual Studio 8\Common7\IDE\devenv.com'}
-
- possible_roots = [ConvertToCygpath(r) for r in possible_roots]
-
- msvs_version = 'auto'
- for flag in (f for f in sys.argv if f.startswith('msvs_version=')):
- msvs_version = flag.split('=')[-1]
- msvs_version = os.environ.get('GYP_MSVS_VERSION', msvs_version)
-
- build_tool = None
- if msvs_version in possible_paths:
- # Check that the path to the specified GYP_MSVS_VERSION exists.
- path = possible_paths[msvs_version]
- for r in possible_roots:
- bt = os.path.join(r, path)
- if os.path.exists(bt):
- build_tool = bt
- uses_msbuild = msvs_version >= '2010'
- return build_tool, uses_msbuild
- else:
- print ('Warning: Environment variable GYP_MSVS_VERSION specifies "%s" '
- 'but corresponding "%s" was not found.' % (msvs_version, path))
- if build_tool:
- # We found 'devenv' on the path, use that and try to guess the version.
- for version, path in possible_paths.iteritems():
- if build_tool.find(path) >= 0:
- uses_msbuild = version >= '2010'
- return build_tool, uses_msbuild
- else:
- # If not, assume not MSBuild.
- uses_msbuild = False
- return build_tool, uses_msbuild
- # Neither GYP_MSVS_VERSION nor the path help us out. Iterate through
- # the choices looking for a match.
- for version in sorted(possible_paths, reverse=True):
- path = possible_paths[version]
- for r in possible_roots:
- bt = os.path.join(r, path)
- if os.path.exists(bt):
- build_tool = bt
- uses_msbuild = msvs_version >= '2010'
- return build_tool, uses_msbuild
- print 'Error: could not find devenv'
- sys.exit(1)
-
-class TestGypOnMSToolchain(TestGypBase):
- """
- Common subclass for testing generators that target the Microsoft Visual
- Studio toolchain (cl, link, dumpbin, etc.)
- """
- @staticmethod
- def _ComputeVsvarsPath(devenv_path):
- devenv_dir = os.path.split(devenv_path)[0]
- vsvars_path = os.path.join(devenv_path, '../../Tools/vsvars32.bat')
- return vsvars_path
-
- def initialize_build_tool(self):
- super(TestGypOnMSToolchain, self).initialize_build_tool()
- if sys.platform in ('win32', 'cygwin'):
- self.devenv_path, self.uses_msbuild = FindVisualStudioInstallation()
- self.vsvars_path = TestGypOnMSToolchain._ComputeVsvarsPath(
- self.devenv_path)
-
- def run_dumpbin(self, *dumpbin_args):
- """Run the dumpbin tool with the specified arguments, and capturing and
- returning stdout."""
- assert sys.platform in ('win32', 'cygwin')
- cmd = os.environ.get('COMSPEC', 'cmd.exe')
- arguments = [cmd, '/c', self.vsvars_path, '&&', 'dumpbin']
- arguments.extend(dumpbin_args)
- proc = subprocess.Popen(arguments, stdout=subprocess.PIPE)
- output = proc.communicate()[0]
- assert not proc.returncode
- return output
-
-class TestGypNinja(TestGypOnMSToolchain):
- """
- Subclass for testing the GYP Ninja generator.
- """
- format = 'ninja'
- build_tool_list = ['ninja']
- ALL = 'all'
- DEFAULT = 'all'
-
- def run_gyp(self, gyp_file, *args, **kw):
- TestGypBase.run_gyp(self, gyp_file, *args, **kw)
-
- def build(self, gyp_file, target=None, **kw):
- arguments = kw.get('arguments', [])[:]
-
- # Add a -C output/path to the command line.
- arguments.append('-C')
- arguments.append(os.path.join('out', self.configuration_dirname()))
-
- if target is None:
- target = 'all'
- arguments.append(target)
-
- kw['arguments'] = arguments
- return self.run(program=self.build_tool, **kw)
-
- def run_built_executable(self, name, *args, **kw):
- # Enclosing the name in a list avoids prepending the original dir.
- program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)]
- if sys.platform == 'darwin':
- configuration = self.configuration_dirname()
- os.environ['DYLD_LIBRARY_PATH'] = os.path.join('out', configuration)
- return self.run(program=program, *args, **kw)
-
- def built_file_path(self, name, type=None, **kw):
- result = []
- chdir = kw.get('chdir')
- if chdir:
- result.append(chdir)
- result.append('out')
- result.append(self.configuration_dirname())
- if type == self.STATIC_LIB:
- if sys.platform != 'darwin':
- result.append('obj')
- elif type == self.SHARED_LIB:
- if sys.platform != 'darwin' and sys.platform != 'win32':
- result.append('lib')
- subdir = kw.get('subdir')
- if subdir and type != self.SHARED_LIB:
- result.append(subdir)
- result.append(self.built_file_basename(name, type, **kw))
- return self.workpath(*result)
-
- def up_to_date(self, gyp_file, target=None, **kw):
- result = self.build(gyp_file, target, **kw)
- if not result:
- stdout = self.stdout()
- if 'ninja: no work to do' not in stdout:
- self.report_not_up_to_date()
- self.fail_test()
- return result
-
-
-class TestGypMSVS(TestGypOnMSToolchain):
- """
- Subclass for testing the GYP Visual Studio generator.
- """
- format = 'msvs'
-
- u = r'=== Build: 0 succeeded, 0 failed, (\d+) up-to-date, 0 skipped ==='
- up_to_date_re = re.compile(u, re.M)
-
- # Initial None element will indicate to our .initialize_build_tool()
- # method below that 'devenv' was not found on %PATH%.
- #
- # Note: we must use devenv.com to be able to capture build output.
- # Directly executing devenv.exe only sends output to BuildLog.htm.
- build_tool_list = [None, 'devenv.com']
-
- def initialize_build_tool(self):
- super(TestGypMSVS, self).initialize_build_tool()
- self.build_tool = self.devenv_path
-
- def build(self, gyp_file, target=None, rebuild=False, **kw):
- """
- Runs a Visual Studio build using the configuration generated
- from the specified gyp_file.
- """
- configuration = self.configuration_buildname()
- if rebuild:
- build = '/Rebuild'
- else:
- build = '/Build'
- arguments = kw.get('arguments', [])[:]
- arguments.extend([gyp_file.replace('.gyp', '.sln'),
- build, configuration])
- # Note: the Visual Studio generator doesn't add an explicit 'all'
- # target, so we just treat it the same as the default.
- if target not in (None, self.ALL, self.DEFAULT):
- arguments.extend(['/Project', target])
- if self.configuration:
- arguments.extend(['/ProjectConfig', self.configuration])
- kw['arguments'] = arguments
- return self.run(program=self.build_tool, **kw)
- def up_to_date(self, gyp_file, target=None, **kw):
- """
- Verifies that a build of the specified Visual Studio target is up to date.
-
- Beware that VS2010 will behave strangely if you build under
- C:\USERS\yourname\AppData\Local. It will cause needless work. The ouptut
- will be "1 succeeded and 0 up to date". MSBuild tracing reveals that:
- "Project 'C:\Users\...\AppData\Local\...vcxproj' not up to date because
- 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 10.0\VC\BIN\1033\CLUI.DLL'
- was modified at 02/21/2011 17:03:30, which is newer than '' which was
- modified at 01/01/0001 00:00:00.
-
- The workaround is to specify a workdir when instantiating the test, e.g.
- test = TestGyp.TestGyp(workdir='workarea')
- """
- result = self.build(gyp_file, target, **kw)
- if not result:
- stdout = self.stdout()
-
- m = self.up_to_date_re.search(stdout)
- up_to_date = m and int(m.group(1)) > 0
- if not up_to_date:
- self.report_not_up_to_date()
- self.fail_test()
- return result
- def run_built_executable(self, name, *args, **kw):
- """
- Runs an executable built by Visual Studio.
- """
- configuration = self.configuration_dirname()
- # Enclosing the name in a list avoids prepending the original dir.
- program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)]
- return self.run(program=program, *args, **kw)
- def built_file_path(self, name, type=None, **kw):
- """
- Returns a path to the specified file name, of the specified type,
- as built by Visual Studio.
-
- Built files are in a subdirectory that matches the configuration
- name. The default is 'Default'.
-
- A chdir= keyword argument specifies the source directory
- relative to which the output subdirectory can be found.
-
- "type" values of STATIC_LIB or SHARED_LIB append the necessary
- prefixes and suffixes to a platform-independent library base name.
- """
- result = []
- chdir = kw.get('chdir')
- if chdir:
- result.append(chdir)
- result.append(self.configuration_dirname())
- if type == self.STATIC_LIB:
- result.append('lib')
- result.append(self.built_file_basename(name, type, **kw))
- return self.workpath(*result)
-
-
-class TestGypSCons(TestGypBase):
- """
- Subclass for testing the GYP SCons generator.
- """
- format = 'scons'
- build_tool_list = ['scons', 'scons.py']
- ALL = 'all'
- def build(self, gyp_file, target=None, **kw):
- """
- Runs a scons build using the SCons configuration generated from the
- specified gyp_file.
- """
- arguments = kw.get('arguments', [])[:]
- dirname = os.path.dirname(gyp_file)
- if dirname:
- arguments.extend(['-C', dirname])
- if self.configuration:
- arguments.append('--mode=' + self.configuration)
- if target not in (None, self.DEFAULT):
- arguments.append(target)
- kw['arguments'] = arguments
- return self.run(program=self.build_tool, **kw)
- def up_to_date(self, gyp_file, target=None, **kw):
- """
- Verifies that a build of the specified SCons target is up to date.
- """
- if target in (None, self.DEFAULT):
- up_to_date_targets = 'all'
- else:
- up_to_date_targets = target
- up_to_date_lines = []
- for arg in up_to_date_targets.split():
- up_to_date_lines.append("scons: `%s' is up to date.\n" % arg)
- kw['stdout'] = ''.join(up_to_date_lines)
- arguments = kw.get('arguments', [])[:]
- arguments.append('-Q')
- kw['arguments'] = arguments
- return self.build(gyp_file, target, **kw)
- def run_built_executable(self, name, *args, **kw):
- """
- Runs an executable built by scons.
- """
- configuration = self.configuration_dirname()
- os.environ['LD_LIBRARY_PATH'] = os.path.join(configuration, 'lib')
- # Enclosing the name in a list avoids prepending the original dir.
- program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)]
- return self.run(program=program, *args, **kw)
- def built_file_path(self, name, type=None, **kw):
- """
- Returns a path to the specified file name, of the specified type,
- as built by Scons.
-
- Built files are in a subdirectory that matches the configuration
- name. The default is 'Default'.
-
- A chdir= keyword argument specifies the source directory
- relative to which the output subdirectory can be found.
-
- "type" values of STATIC_LIB or SHARED_LIB append the necessary
- prefixes and suffixes to a platform-independent library base name.
- """
- result = []
- chdir = kw.get('chdir')
- if chdir:
- result.append(chdir)
- result.append(self.configuration_dirname())
- if type in (self.STATIC_LIB, self.SHARED_LIB):
- result.append('lib')
- result.append(self.built_file_basename(name, type, **kw))
- return self.workpath(*result)
-
-
-class TestGypXcode(TestGypBase):
- """
- Subclass for testing the GYP Xcode generator.
- """
- format = 'xcode'
- build_tool_list = ['xcodebuild']
-
- phase_script_execution = ("\n"
- "PhaseScriptExecution /\\S+/Script-[0-9A-F]+\\.sh\n"
- " cd /\\S+\n"
- " /bin/sh -c /\\S+/Script-[0-9A-F]+\\.sh\n"
- "(make: Nothing to be done for `all'\\.\n)?")
-
- strip_up_to_date_expressions = [
- # Various actions or rules can run even when the overall build target
- # is up to date. Strip those phases' GYP-generated output.
- re.compile(phase_script_execution, re.S),
-
- # The message from distcc_pump can trail the "BUILD SUCCEEDED"
- # message, so strip that, too.
- re.compile('__________Shutting down distcc-pump include server\n', re.S),
- ]
-
- up_to_date_endings = (
- 'Checking Dependencies...\n** BUILD SUCCEEDED **\n', # Xcode 3.0/3.1
- 'Check dependencies\n** BUILD SUCCEEDED **\n\n', # Xcode 3.2
- )
-
- def build(self, gyp_file, target=None, **kw):
- """
- Runs an xcodebuild using the .xcodeproj generated from the specified
- gyp_file.
- """
- # Be sure we're working with a copy of 'arguments' since we modify it.
- # The caller may not be expecting it to be modified.
- arguments = kw.get('arguments', [])[:]
- arguments.extend(['-project', gyp_file.replace('.gyp', '.xcodeproj')])
- if target == self.ALL:
- arguments.append('-alltargets',)
- elif target not in (None, self.DEFAULT):
- arguments.extend(['-target', target])
- if self.configuration:
- arguments.extend(['-configuration', self.configuration])
- symroot = kw.get('SYMROOT', '$SRCROOT/build')
- if symroot:
- arguments.append('SYMROOT='+symroot)
- kw['arguments'] = arguments
- return self.run(program=self.build_tool, **kw)
- def up_to_date(self, gyp_file, target=None, **kw):
- """
- Verifies that a build of the specified Xcode target is up to date.
- """
- result = self.build(gyp_file, target, **kw)
- if not result:
- output = self.stdout()
- for expression in self.strip_up_to_date_expressions:
- output = expression.sub('', output)
- if not output.endswith(self.up_to_date_endings):
- self.report_not_up_to_date()
- self.fail_test()
- return result
- def run_built_executable(self, name, *args, **kw):
- """
- Runs an executable built by xcodebuild.
- """
- configuration = self.configuration_dirname()
- os.environ['DYLD_LIBRARY_PATH'] = os.path.join('build', configuration)
- # Enclosing the name in a list avoids prepending the original dir.
- program = [self.built_file_path(name, type=self.EXECUTABLE, **kw)]
- return self.run(program=program, *args, **kw)
- def built_file_path(self, name, type=None, **kw):
- """
- Returns a path to the specified file name, of the specified type,
- as built by Xcode.
-
- Built files are in the subdirectory 'build/{configuration}'.
- The default is 'build/Default'.
-
- A chdir= keyword argument specifies the source directory
- relative to which the output subdirectory can be found.
-
- "type" values of STATIC_LIB or SHARED_LIB append the necessary
- prefixes and suffixes to a platform-independent library base name.
- """
- result = []
- chdir = kw.get('chdir')
- if chdir:
- result.append(chdir)
- configuration = self.configuration_dirname()
- result.extend(['build', configuration])
- result.append(self.built_file_basename(name, type, **kw))
- return self.workpath(*result)
-
-
-format_class_list = [
- TestGypGypd,
- TestGypAndroid,
- TestGypMake,
- TestGypMSVS,
- TestGypNinja,
- TestGypSCons,
- TestGypXcode,
-]
-
-def TestGyp(*args, **kw):
- """
- Returns an appropriate TestGyp* instance for a specified GYP format.
- """
- format = kw.pop('format', os.environ.get('TESTGYP_FORMAT'))
- for format_class in format_class_list:
- if format == format_class.format:
- return format_class(*args, **kw)
- raise Exception, "unknown format %r" % format
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that .so files that are order only dependencies are specified by
-their install location rather than by their alias.
-"""
-
-# Python 2.5 needs this for the with statement.
-from __future__ import with_statement
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['make'])
-
-test.run_gyp('shared_dependency.gyp',
- chdir='src')
-test.relocate('src', 'relocate/src')
-
-test.build('shared_dependency.gyp', test.ALL, chdir='relocate/src')
-
-if test.format=='android':
- makefile_path = 'relocate/src/GypAndroid.mk'
-else:
- makefile_path = 'relocate/src/Makefile'
-
-with open(makefile_path) as makefile:
- make_contents = makefile.read()
-
-# If we remove the code to generate lib1, Make should still be able
-# to build lib2 since lib1.so already exists.
-make_contents = make_contents.replace('include lib1.target.mk', '')
-with open(makefile_path, 'w') as makefile:
- makefile.write(make_contents)
-
-test.build('shared_dependency.gyp', test.ALL, chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple build of a "Hello, world!" program with shared libraries,
-including verifying that libraries are rebuilt correctly when functions
-move between libraries.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('library.gyp',
- '-Dlibrary=shared_library',
- '-Dmoveable_function=lib1',
- chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('library.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from program.c
-Hello from lib1.c
-Hello from lib2.c
-Hello from lib1_moveable.c
-"""
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
-test.run_gyp('library.gyp',
- '-Dlibrary=shared_library',
- '-Dmoveable_function=lib2',
- chdir='relocate/src')
-
-# Update program.c to force a rebuild.
-test.sleep()
-contents = test.read('relocate/src/program.c')
-contents = contents.replace('Hello', 'Hello again')
-test.write('relocate/src/program.c', contents)
-
-test.build('library.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello again from program.c
-Hello from lib1.c
-Hello from lib2.c
-Hello from lib2_moveable.c
-"""
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
-test.run_gyp('library.gyp',
- '-Dlibrary=shared_library',
- '-Dmoveable_function=lib1',
- chdir='relocate/src')
-
-# Update program.c to force a rebuild.
-test.sleep()
-contents = test.read('relocate/src/program.c')
-contents = contents.replace('again', 'again again')
-test.write('relocate/src/program.c', contents)
-
-# TODO(sgk): we have to force a rebuild of lib2 so that it weeds out
-# the "moved" module. This should be done in gyp by adding a dependency
-# on the generated .vcproj file itself.
-test.touch('relocate/src/lib2.c')
-
-test.build('library.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello again again from program.c
-Hello from lib1.c
-Hello from lib2.c
-Hello from lib1_moveable.c
-"""
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple build of a "Hello, world!" program with static libraries,
-including verifying that libraries are rebuilt correctly when functions
-move between libraries.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('library.gyp',
- '-Dlibrary=static_library',
- '-Dmoveable_function=lib1',
- chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('library.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from program.c
-Hello from lib1.c
-Hello from lib2.c
-Hello from lib1_moveable.c
-"""
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
-test.run_gyp('library.gyp',
- '-Dlibrary=static_library',
- '-Dmoveable_function=lib2',
- chdir='relocate/src')
-
-# Update program.c to force a rebuild.
-test.sleep()
-contents = test.read('relocate/src/program.c')
-contents = contents.replace('Hello', 'Hello again')
-test.write('relocate/src/program.c', contents)
-
-test.build('library.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello again from program.c
-Hello from lib1.c
-Hello from lib2.c
-Hello from lib2_moveable.c
-"""
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
-test.run_gyp('library.gyp',
- '-Dlibrary=static_library',
- '-Dmoveable_function=lib1',
- chdir='relocate/src')
-
-# Update program.c and lib2.c to force a rebuild.
-test.sleep()
-contents = test.read('relocate/src/program.c')
-contents = contents.replace('again', 'again again')
-test.write('relocate/src/program.c', contents)
-
-# TODO(sgk): we have to force a rebuild of lib2 so that it weeds out
-# the "moved" module. This should be done in gyp by adding a dependency
-# on the generated .vcproj file itself.
-test.touch('relocate/src/lib2.c')
-
-test.build('library.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello again again from program.c
-Hello from lib1.c
-Hello from lib2.c
-Hello from lib1_moveable.c
-"""
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-
-test.pass_test()
+++ /dev/null
-#include <stdio.h>
-
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-void lib1_function(void)
-{
- fprintf(stdout, "Hello from lib1.c\n");
- fflush(stdout);
-}
+++ /dev/null
-#include <stdio.h>
-
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-void moveable_function(void)
-{
- fprintf(stdout, "Hello from lib1_moveable.c\n");
- fflush(stdout);
-}
+++ /dev/null
-#include <stdio.h>
-
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-void lib2_function(void)
-{
- fprintf(stdout, "Hello from lib2.c\n");
- fflush(stdout);
-}
+++ /dev/null
-#include <stdio.h>
-
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-void moveable_function(void)
-{
- fprintf(stdout, "Hello from lib2_moveable.c\n");
- fflush(stdout);
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'moveable_function%': 0,
- },
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'dependencies': [
- 'lib1',
- 'lib2',
- ],
- 'sources': [
- 'program.c',
- ],
- },
- {
- 'target_name': 'lib1',
- 'type': '<(library)',
- 'sources': [
- 'lib1.c',
- ],
- 'conditions': [
- ['moveable_function=="lib1"', {
- 'sources': [
- 'lib1_moveable.c',
- ],
- }],
- ],
- },
- {
- 'target_name': 'lib2',
- 'type': '<(library)',
- 'sources': [
- 'lib2.c',
- ],
- 'conditions': [
- ['moveable_function=="lib2"', {
- 'sources': [
- 'lib2_moveable.c',
- ],
- }],
- ],
- },
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'target_defaults': {
- # Support 64-bit shared libs (also works fine for 32-bit).
- 'cflags': ['-fPIC'],
- },
- }],
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void lib1_function(void);
-extern void lib2_function(void);
-extern void moveable_function(void);
-
-int main(int argc, char *argv[])
-{
- fprintf(stdout, "Hello from program.c\n");
- fflush(stdout);
- lib1_function();
- lib2_function();
- moveable_function();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'lib1',
- 'type': 'shared_library',
- 'sources': [
- 'lib1.c',
- ],
- },
- {
- 'target_name': 'lib2',
- 'type': 'shared_library',
- 'sources': [
- 'lib2.c',
- ],
- 'dependencies': [
- 'lib1',
- ],
- },
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'target_defaults': {
- # Support 64-bit shared libs (also works fine for 32-bit).
- 'cflags': ['-fPIC'],
- },
- }],
- ],
-}
+++ /dev/null
-void extra();
-
-int main(int argc, char** argv) {
- extra();
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-void extra() {
- printf("PASS\n");
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Put an object file on the sources list.
-Expect the result to link ok.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform != 'darwin':
- # Currently only works under the linux make build.
- test = TestGyp.TestGyp(formats=['make'])
-
- test.run_gyp('link-objects.gyp')
-
- test.build('link-objects.gyp', test.ALL)
-
- test.run_built_executable('link-objects', stdout="PASS\n")
-
- test.up_to_date('link-objects.gyp', test.ALL)
-
- test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'link-objects',
- 'type': 'executable',
- 'actions': [
- {
- 'action_name': 'build extra object',
- 'inputs': ['extra.c'],
- 'outputs': ['extra.o'],
- 'action': ['gcc', '-o', 'extra.o', '-c', 'extra.c'],
- 'process_outputs_as_sources': 1,
- },
- ],
- 'sources': [
- 'base.c',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'action',
- 'type': 'none',
- 'actions': [
- {
- 'inputs': [ ],
- 'outputs': [
- '<(PRODUCT_DIR)/result',
- '<(SHARED_INTERMEDIATE_DIR)/tempfile',
- ],
- 'action_name': 'Test action',
- 'action': ['./action.sh', '<(SHARED_INTERMEDIATE_DIR)/tempfile' ],
- },
- {
- 'inputs': [
- '<(SHARED_INTERMEDIATE_DIR)/tempfile',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/other_result',
- ],
- 'action_name': 'Other test action',
- 'action': ['cp', '<(SHARED_INTERMEDIATE_DIR)/tempfile',
- '<(PRODUCT_DIR)/other_result' ],
- },
- ],
- },
- ],
-}
-
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-echo 'Test output' > "${BUILT_PRODUCTS_DIR}/result"
-echo 'Other output' > "$1"
+++ /dev/null
-/* Localized versions of Info.plist keys */
-
-NSHumanReadableCopyright = "Copyright ©2011 Google Inc."
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
- <data>
- <int key="IBDocument.SystemTarget">1060</int>
- <string key="IBDocument.SystemVersion">10A324</string>
- <string key="IBDocument.InterfaceBuilderVersion">719</string>
- <string key="IBDocument.AppKitVersion">1015</string>
- <string key="IBDocument.HIToolboxVersion">418.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">719</string>
- </object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="371"/>
- <integer value="29"/>
- </object>
- <object class="NSArray" key="IBDocument.PluginDependencies">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSCustomObject" id="1021">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSCustomObject" id="1014">
- <string key="NSClassName">FirstResponder</string>
- </object>
- <object class="NSCustomObject" id="1050">
- <string key="NSClassName">NSApplication</string>
- </object>
- <object class="NSMenu" id="649796088">
- <string key="NSTitle">AMainMenu</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="694149608">
- <reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">TestApp</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <object class="NSCustomResource" key="NSOnImage" id="35465992">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuCheckmark</string>
- </object>
- <object class="NSCustomResource" key="NSMixedImage" id="502551668">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuMixedState</string>
- </object>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="110575045">
- <string key="NSTitle">TestApp</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="238522557">
- <reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">About TestApp</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="304266470">
- <reference key="NSMenu" ref="110575045"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="609285721">
- <reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Preferences…</string>
- <string key="NSKeyEquiv">,</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="481834944">
- <reference key="NSMenu" ref="110575045"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1046388886">
- <reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Services</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="752062318">
- <string key="NSTitle">Services</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <string key="NSName">_NSServicesMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="646227648">
- <reference key="NSMenu" ref="110575045"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="755159360">
- <reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Hide TestApp</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="342932134">
- <reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Hide Others</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="908899353">
- <reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Show All</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1056857174">
- <reference key="NSMenu" ref="110575045"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="632727374">
- <reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Quit TestApp</string>
- <string key="NSKeyEquiv">q</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- <string key="NSName">_NSAppleMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="379814623">
- <reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">File</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="720053764">
- <string key="NSTitle">File</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="705341025">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">New</string>
- <string key="NSKeyEquiv">n</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="722745758">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Open…</string>
- <string key="NSKeyEquiv">o</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1025936716">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Open Recent</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="1065607017">
- <string key="NSTitle">Open Recent</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="759406840">
- <reference key="NSMenu" ref="1065607017"/>
- <string key="NSTitle">Clear Menu</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- <string key="NSName">_NSRecentDocumentsMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="425164168">
- <reference key="NSMenu" ref="720053764"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="776162233">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Close</string>
- <string key="NSKeyEquiv">w</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1023925487">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Save</string>
- <string key="NSKeyEquiv">s</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="117038363">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Save As…</string>
- <string key="NSKeyEquiv">S</string>
- <int key="NSKeyEquivModMask">1179648</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="579971712">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Revert to Saved</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1010469920">
- <reference key="NSMenu" ref="720053764"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="294629803">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Page Setup...</string>
- <string key="NSKeyEquiv">P</string>
- <int key="NSKeyEquivModMask">1179648</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSToolTip"/>
- </object>
- <object class="NSMenuItem" id="49223823">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Print…</string>
- <string key="NSKeyEquiv">p</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="952259628">
- <reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">Edit</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="789758025">
- <string key="NSTitle">Edit</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="1058277027">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Undo</string>
- <string key="NSKeyEquiv">z</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="790794224">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Redo</string>
- <string key="NSKeyEquiv">Z</string>
- <int key="NSKeyEquivModMask">1179648</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1040322652">
- <reference key="NSMenu" ref="789758025"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="296257095">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Cut</string>
- <string key="NSKeyEquiv">x</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="860595796">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Copy</string>
- <string key="NSKeyEquiv">c</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="29853731">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Paste</string>
- <string key="NSKeyEquiv">v</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="82994268">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Paste and Match Style</string>
- <string key="NSKeyEquiv">V</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="437104165">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Delete</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="583158037">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Select All</string>
- <string key="NSKeyEquiv">a</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="212016141">
- <reference key="NSMenu" ref="789758025"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="892235320">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Find</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="963351320">
- <string key="NSTitle">Find</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="447796847">
- <reference key="NSMenu" ref="963351320"/>
- <string key="NSTitle">Find…</string>
- <string key="NSKeyEquiv">f</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">1</int>
- </object>
- <object class="NSMenuItem" id="326711663">
- <reference key="NSMenu" ref="963351320"/>
- <string key="NSTitle">Find Next</string>
- <string key="NSKeyEquiv">g</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">2</int>
- </object>
- <object class="NSMenuItem" id="270902937">
- <reference key="NSMenu" ref="963351320"/>
- <string key="NSTitle">Find Previous</string>
- <string key="NSKeyEquiv">G</string>
- <int key="NSKeyEquivModMask">1179648</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">3</int>
- </object>
- <object class="NSMenuItem" id="159080638">
- <reference key="NSMenu" ref="963351320"/>
- <string key="NSTitle">Use Selection for Find</string>
- <string key="NSKeyEquiv">e</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">7</int>
- </object>
- <object class="NSMenuItem" id="88285865">
- <reference key="NSMenu" ref="963351320"/>
- <string key="NSTitle">Jump to Selection</string>
- <string key="NSKeyEquiv">j</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="972420730">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Spelling and Grammar</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="769623530">
- <string key="NSTitle">Spelling and Grammar</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="679648819">
- <reference key="NSMenu" ref="769623530"/>
- <string key="NSTitle">Show Spelling and Grammar</string>
- <string key="NSKeyEquiv">:</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="96193923">
- <reference key="NSMenu" ref="769623530"/>
- <string key="NSTitle">Check Document Now</string>
- <string key="NSKeyEquiv">;</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="859480356">
- <reference key="NSMenu" ref="769623530"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="948374510">
- <reference key="NSMenu" ref="769623530"/>
- <string key="NSTitle">Check Spelling While Typing</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="967646866">
- <reference key="NSMenu" ref="769623530"/>
- <string key="NSTitle">Check Grammar With Spelling</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="795346622">
- <reference key="NSMenu" ref="769623530"/>
- <string key="NSTitle">Correct Spelling Automatically</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="507821607">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Substitutions</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="698887838">
- <string key="NSTitle">Substitutions</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="65139061">
- <reference key="NSMenu" ref="698887838"/>
- <string key="NSTitle">Show Substitutions</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="19036812">
- <reference key="NSMenu" ref="698887838"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="605118523">
- <reference key="NSMenu" ref="698887838"/>
- <string key="NSTitle">Smart Copy/Paste</string>
- <string key="NSKeyEquiv">f</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">1</int>
- </object>
- <object class="NSMenuItem" id="197661976">
- <reference key="NSMenu" ref="698887838"/>
- <string key="NSTitle">Smart Quotes</string>
- <string key="NSKeyEquiv">g</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">2</int>
- </object>
- <object class="NSMenuItem" id="672708820">
- <reference key="NSMenu" ref="698887838"/>
- <string key="NSTitle">Smart Dashes</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="708854459">
- <reference key="NSMenu" ref="698887838"/>
- <string key="NSTitle">Smart Links</string>
- <string key="NSKeyEquiv">G</string>
- <int key="NSKeyEquivModMask">1179648</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">3</int>
- </object>
- <object class="NSMenuItem" id="537092702">
- <reference key="NSMenu" ref="698887838"/>
- <string key="NSTitle">Text Replacement</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="288088188">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Transformations</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="579392910">
- <string key="NSTitle">Transformations</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="1060694897">
- <reference key="NSMenu" ref="579392910"/>
- <string key="NSTitle">Make Upper Case</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="879586729">
- <reference key="NSMenu" ref="579392910"/>
- <string key="NSTitle">Make Lower Case</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="56570060">
- <reference key="NSMenu" ref="579392910"/>
- <string key="NSTitle">Capitalize</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="676164635">
- <reference key="NSMenu" ref="789758025"/>
- <string key="NSTitle">Speech</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="785027613">
- <string key="NSTitle">Speech</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="731782645">
- <reference key="NSMenu" ref="785027613"/>
- <string key="NSTitle">Start Speaking</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="680220178">
- <reference key="NSMenu" ref="785027613"/>
- <string key="NSTitle">Stop Speaking</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="302598603">
- <reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">Format</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="941447902">
- <string key="NSTitle">Format</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="792887677">
- <reference key="NSMenu" ref="941447902"/>
- <string key="NSTitle">Font</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="786677654">
- <string key="NSTitle">Font</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="159677712">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Show Fonts</string>
- <string key="NSKeyEquiv">t</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="305399458">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Bold</string>
- <string key="NSKeyEquiv">b</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">2</int>
- </object>
- <object class="NSMenuItem" id="814362025">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Italic</string>
- <string key="NSKeyEquiv">i</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">1</int>
- </object>
- <object class="NSMenuItem" id="330926929">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Underline</string>
- <string key="NSKeyEquiv">u</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="533507878">
- <reference key="NSMenu" ref="786677654"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="158063935">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Bigger</string>
- <string key="NSKeyEquiv">+</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">3</int>
- </object>
- <object class="NSMenuItem" id="885547335">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Smaller</string>
- <string key="NSKeyEquiv">-</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <int key="NSTag">4</int>
- </object>
- <object class="NSMenuItem" id="901062459">
- <reference key="NSMenu" ref="786677654"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="767671776">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Kern</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="175441468">
- <string key="NSTitle">Kern</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="252969304">
- <reference key="NSMenu" ref="175441468"/>
- <string key="NSTitle">Use Default</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="766922938">
- <reference key="NSMenu" ref="175441468"/>
- <string key="NSTitle">Use None</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="677519740">
- <reference key="NSMenu" ref="175441468"/>
- <string key="NSTitle">Tighten</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="238351151">
- <reference key="NSMenu" ref="175441468"/>
- <string key="NSTitle">Loosen</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="691570813">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Ligature</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="1058217995">
- <string key="NSTitle">Ligature</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="706297211">
- <reference key="NSMenu" ref="1058217995"/>
- <string key="NSTitle">Use Default</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="568384683">
- <reference key="NSMenu" ref="1058217995"/>
- <string key="NSTitle">Use None</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="663508465">
- <reference key="NSMenu" ref="1058217995"/>
- <string key="NSTitle">Use All</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="769124883">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Baseline</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="18263474">
- <string key="NSTitle">Baseline</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="257962622">
- <reference key="NSMenu" ref="18263474"/>
- <string key="NSTitle">Use Default</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="644725453">
- <reference key="NSMenu" ref="18263474"/>
- <string key="NSTitle">Superscript</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1037576581">
- <reference key="NSMenu" ref="18263474"/>
- <string key="NSTitle">Subscript</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="941806246">
- <reference key="NSMenu" ref="18263474"/>
- <string key="NSTitle">Raise</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1045724900">
- <reference key="NSMenu" ref="18263474"/>
- <string key="NSTitle">Lower</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="739652853">
- <reference key="NSMenu" ref="786677654"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="1012600125">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Show Colors</string>
- <string key="NSKeyEquiv">C</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="214559597">
- <reference key="NSMenu" ref="786677654"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="596732606">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Copy Style</string>
- <string key="NSKeyEquiv">c</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="393423671">
- <reference key="NSMenu" ref="786677654"/>
- <string key="NSTitle">Paste Style</string>
- <string key="NSKeyEquiv">v</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- <string key="NSName">_NSFontMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="215659978">
- <reference key="NSMenu" ref="941447902"/>
- <string key="NSTitle">Text</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="446991534">
- <string key="NSTitle">Text</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="875092757">
- <reference key="NSMenu" ref="446991534"/>
- <string key="NSTitle">Align Left</string>
- <string key="NSKeyEquiv">{</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="630155264">
- <reference key="NSMenu" ref="446991534"/>
- <string key="NSTitle">Center</string>
- <string key="NSKeyEquiv">|</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="945678886">
- <reference key="NSMenu" ref="446991534"/>
- <string key="NSTitle">Justify</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="512868991">
- <reference key="NSMenu" ref="446991534"/>
- <string key="NSTitle">Align Right</string>
- <string key="NSKeyEquiv">}</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="163117631">
- <reference key="NSMenu" ref="446991534"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="31516759">
- <reference key="NSMenu" ref="446991534"/>
- <string key="NSTitle">Writing Direction</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="956096989">
- <string key="NSTitle">Writing Direction</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="257099033">
- <reference key="NSMenu" ref="956096989"/>
- <bool key="NSIsDisabled">YES</bool>
- <string key="NSTitle">Paragraph</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="551969625">
- <reference key="NSMenu" ref="956096989"/>
- <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="249532473">
- <reference key="NSMenu" ref="956096989"/>
- <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="607364498">
- <reference key="NSMenu" ref="956096989"/>
- <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="508151438">
- <reference key="NSMenu" ref="956096989"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="981751889">
- <reference key="NSMenu" ref="956096989"/>
- <bool key="NSIsDisabled">YES</bool>
- <string key="NSTitle">Selection</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="380031999">
- <reference key="NSMenu" ref="956096989"/>
- <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="825984362">
- <reference key="NSMenu" ref="956096989"/>
- <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="560145579">
- <reference key="NSMenu" ref="956096989"/>
- <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="908105787">
- <reference key="NSMenu" ref="446991534"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="644046920">
- <reference key="NSMenu" ref="446991534"/>
- <string key="NSTitle">Show Ruler</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="231811626">
- <reference key="NSMenu" ref="446991534"/>
- <string key="NSTitle">Copy Ruler</string>
- <string key="NSKeyEquiv">c</string>
- <int key="NSKeyEquivModMask">1310720</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="883618387">
- <reference key="NSMenu" ref="446991534"/>
- <string key="NSTitle">Paste Ruler</string>
- <string key="NSKeyEquiv">v</string>
- <int key="NSKeyEquivModMask">1310720</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="586577488">
- <reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">View</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="466310130">
- <string key="NSTitle">View</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="102151532">
- <reference key="NSMenu" ref="466310130"/>
- <string key="NSTitle">Show Toolbar</string>
- <string key="NSKeyEquiv">t</string>
- <int key="NSKeyEquivModMask">1572864</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="237841660">
- <reference key="NSMenu" ref="466310130"/>
- <string key="NSTitle">Customize Toolbar…</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- </object>
- </object>
- <object class="NSMenuItem" id="713487014">
- <reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">Window</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="835318025">
- <string key="NSTitle">Window</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="1011231497">
- <reference key="NSMenu" ref="835318025"/>
- <string key="NSTitle">Minimize</string>
- <string key="NSKeyEquiv">m</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="575023229">
- <reference key="NSMenu" ref="835318025"/>
- <string key="NSTitle">Zoom</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="299356726">
- <reference key="NSMenu" ref="835318025"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- <object class="NSMenuItem" id="625202149">
- <reference key="NSMenu" ref="835318025"/>
- <string key="NSTitle">Bring All to Front</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- <string key="NSName">_NSWindowsMenu</string>
- </object>
- </object>
- <object class="NSMenuItem" id="448692316">
- <reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">Help</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="992780483">
- <string key="NSTitle">Help</string>
- <object class="NSMutableArray" key="NSMenuItems">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="105068016">
- <reference key="NSMenu" ref="992780483"/>
- <string key="NSTitle">TestApp Help</string>
- <string key="NSKeyEquiv">?</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
- </object>
- <string key="NSName">_NSHelpMenu</string>
- </object>
- </object>
- </object>
- <string key="NSName">_NSMainMenu</string>
- </object>
- <object class="NSWindowTemplate" id="972006081">
- <int key="NSWindowStyleMask">15</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{335, 390}, {480, 360}}</string>
- <int key="NSWTFlags">1954021376</int>
- <string key="NSWindowTitle">TestApp</string>
- <string key="NSWindowClass">NSWindow</string>
- <nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
- <object class="NSView" key="NSWindowView" id="439893737">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{480, 360}</string>
- <reference key="NSSuperview"/>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
- </object>
- <object class="NSCustomObject" id="976324537">
- <string key="NSClassName">TestAppAppDelegate</string>
- </object>
- <object class="NSCustomObject" id="755631768">
- <string key="NSClassName">NSFontManager</string>
- </object>
- </object>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <object class="NSMutableArray" key="connectionRecords">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performMiniaturize:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="1011231497"/>
- </object>
- <int key="connectionID">37</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">arrangeInFront:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="625202149"/>
- </object>
- <int key="connectionID">39</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">print:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="49223823"/>
- </object>
- <int key="connectionID">86</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">runPageLayout:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="294629803"/>
- </object>
- <int key="connectionID">87</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">clearRecentDocuments:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="759406840"/>
- </object>
- <int key="connectionID">127</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">orderFrontStandardAboutPanel:</string>
- <reference key="source" ref="1021"/>
- <reference key="destination" ref="238522557"/>
- </object>
- <int key="connectionID">142</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performClose:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="776162233"/>
- </object>
- <int key="connectionID">193</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleContinuousSpellChecking:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="948374510"/>
- </object>
- <int key="connectionID">222</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">undo:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="1058277027"/>
- </object>
- <int key="connectionID">223</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">copy:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="860595796"/>
- </object>
- <int key="connectionID">224</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">checkSpelling:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="96193923"/>
- </object>
- <int key="connectionID">225</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">paste:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="29853731"/>
- </object>
- <int key="connectionID">226</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">stopSpeaking:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="680220178"/>
- </object>
- <int key="connectionID">227</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">cut:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="296257095"/>
- </object>
- <int key="connectionID">228</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">showGuessPanel:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="679648819"/>
- </object>
- <int key="connectionID">230</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">redo:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="790794224"/>
- </object>
- <int key="connectionID">231</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">selectAll:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="583158037"/>
- </object>
- <int key="connectionID">232</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">startSpeaking:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="731782645"/>
- </object>
- <int key="connectionID">233</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">delete:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="437104165"/>
- </object>
- <int key="connectionID">235</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performZoom:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="575023229"/>
- </object>
- <int key="connectionID">240</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performFindPanelAction:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="447796847"/>
- </object>
- <int key="connectionID">241</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">centerSelectionInVisibleArea:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="88285865"/>
- </object>
- <int key="connectionID">245</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleGrammarChecking:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="967646866"/>
- </object>
- <int key="connectionID">347</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleSmartInsertDelete:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="605118523"/>
- </object>
- <int key="connectionID">355</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleAutomaticQuoteSubstitution:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="197661976"/>
- </object>
- <int key="connectionID">356</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleAutomaticLinkDetection:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="708854459"/>
- </object>
- <int key="connectionID">357</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">saveDocument:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="1023925487"/>
- </object>
- <int key="connectionID">362</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">saveDocumentAs:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="117038363"/>
- </object>
- <int key="connectionID">363</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">revertDocumentToSaved:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="579971712"/>
- </object>
- <int key="connectionID">364</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">runToolbarCustomizationPalette:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="237841660"/>
- </object>
- <int key="connectionID">365</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleToolbarShown:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="102151532"/>
- </object>
- <int key="connectionID">366</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">hide:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="755159360"/>
- </object>
- <int key="connectionID">367</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">hideOtherApplications:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="342932134"/>
- </object>
- <int key="connectionID">368</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">unhideAllApplications:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="908899353"/>
- </object>
- <int key="connectionID">370</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">newDocument:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="705341025"/>
- </object>
- <int key="connectionID">373</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">openDocument:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="722745758"/>
- </object>
- <int key="connectionID">374</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">addFontTrait:</string>
- <reference key="source" ref="755631768"/>
- <reference key="destination" ref="305399458"/>
- </object>
- <int key="connectionID">421</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">addFontTrait:</string>
- <reference key="source" ref="755631768"/>
- <reference key="destination" ref="814362025"/>
- </object>
- <int key="connectionID">422</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">modifyFont:</string>
- <reference key="source" ref="755631768"/>
- <reference key="destination" ref="885547335"/>
- </object>
- <int key="connectionID">423</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">orderFrontFontPanel:</string>
- <reference key="source" ref="755631768"/>
- <reference key="destination" ref="159677712"/>
- </object>
- <int key="connectionID">424</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">modifyFont:</string>
- <reference key="source" ref="755631768"/>
- <reference key="destination" ref="158063935"/>
- </object>
- <int key="connectionID">425</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">raiseBaseline:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="941806246"/>
- </object>
- <int key="connectionID">426</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">lowerBaseline:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="1045724900"/>
- </object>
- <int key="connectionID">427</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">copyFont:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="596732606"/>
- </object>
- <int key="connectionID">428</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">subscript:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="1037576581"/>
- </object>
- <int key="connectionID">429</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">superscript:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="644725453"/>
- </object>
- <int key="connectionID">430</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">tightenKerning:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="677519740"/>
- </object>
- <int key="connectionID">431</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">underline:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="330926929"/>
- </object>
- <int key="connectionID">432</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">orderFrontColorPanel:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="1012600125"/>
- </object>
- <int key="connectionID">433</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">useAllLigatures:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="663508465"/>
- </object>
- <int key="connectionID">434</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">loosenKerning:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="238351151"/>
- </object>
- <int key="connectionID">435</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">pasteFont:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="393423671"/>
- </object>
- <int key="connectionID">436</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">unscript:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="257962622"/>
- </object>
- <int key="connectionID">437</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">useStandardKerning:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="252969304"/>
- </object>
- <int key="connectionID">438</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">useStandardLigatures:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="706297211"/>
- </object>
- <int key="connectionID">439</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">turnOffLigatures:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="568384683"/>
- </object>
- <int key="connectionID">440</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">turnOffKerning:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="766922938"/>
- </object>
- <int key="connectionID">441</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">terminate:</string>
- <reference key="source" ref="1050"/>
- <reference key="destination" ref="632727374"/>
- </object>
- <int key="connectionID">449</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleAutomaticSpellingCorrection:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="795346622"/>
- </object>
- <int key="connectionID">456</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">orderFrontSubstitutionsPanel:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="65139061"/>
- </object>
- <int key="connectionID">458</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleAutomaticDashSubstitution:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="672708820"/>
- </object>
- <int key="connectionID">461</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleAutomaticTextReplacement:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="537092702"/>
- </object>
- <int key="connectionID">463</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">uppercaseWord:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="1060694897"/>
- </object>
- <int key="connectionID">464</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">capitalizeWord:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="56570060"/>
- </object>
- <int key="connectionID">467</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">lowercaseWord:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="879586729"/>
- </object>
- <int key="connectionID">468</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">pasteAsPlainText:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="82994268"/>
- </object>
- <int key="connectionID">486</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performFindPanelAction:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="326711663"/>
- </object>
- <int key="connectionID">487</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performFindPanelAction:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="270902937"/>
- </object>
- <int key="connectionID">488</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performFindPanelAction:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="159080638"/>
- </object>
- <int key="connectionID">489</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">showHelp:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="105068016"/>
- </object>
- <int key="connectionID">493</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="1021"/>
- <reference key="destination" ref="976324537"/>
- </object>
- <int key="connectionID">495</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">alignCenter:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="630155264"/>
- </object>
- <int key="connectionID">518</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">pasteRuler:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="883618387"/>
- </object>
- <int key="connectionID">519</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">toggleRuler:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="644046920"/>
- </object>
- <int key="connectionID">520</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">alignRight:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="512868991"/>
- </object>
- <int key="connectionID">521</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">copyRuler:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="231811626"/>
- </object>
- <int key="connectionID">522</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">alignJustified:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="945678886"/>
- </object>
- <int key="connectionID">523</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">alignLeft:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="875092757"/>
- </object>
- <int key="connectionID">524</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">makeBaseWritingDirectionNatural:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="551969625"/>
- </object>
- <int key="connectionID">525</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">makeBaseWritingDirectionLeftToRight:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="249532473"/>
- </object>
- <int key="connectionID">526</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">makeBaseWritingDirectionRightToLeft:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="607364498"/>
- </object>
- <int key="connectionID">527</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">makeTextWritingDirectionNatural:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="380031999"/>
- </object>
- <int key="connectionID">528</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">makeTextWritingDirectionLeftToRight:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="825984362"/>
- </object>
- <int key="connectionID">529</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">makeTextWritingDirectionRightToLeft:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="560145579"/>
- </object>
- <int key="connectionID">530</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">window</string>
- <reference key="source" ref="976324537"/>
- <reference key="destination" ref="972006081"/>
- </object>
- <int key="connectionID">532</int>
- </object>
- </object>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <object class="NSArray" key="orderedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <reference key="object" ref="0"/>
- <reference key="children" ref="1048"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="1021"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="1014"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">First Responder</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-3</int>
- <reference key="object" ref="1050"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">Application</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">29</int>
- <reference key="object" ref="649796088"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="713487014"/>
- <reference ref="694149608"/>
- <reference ref="952259628"/>
- <reference ref="379814623"/>
- <reference ref="586577488"/>
- <reference ref="302598603"/>
- <reference ref="448692316"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">19</int>
- <reference key="object" ref="713487014"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="835318025"/>
- </object>
- <reference key="parent" ref="649796088"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">56</int>
- <reference key="object" ref="694149608"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="110575045"/>
- </object>
- <reference key="parent" ref="649796088"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">217</int>
- <reference key="object" ref="952259628"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="789758025"/>
- </object>
- <reference key="parent" ref="649796088"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">83</int>
- <reference key="object" ref="379814623"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="720053764"/>
- </object>
- <reference key="parent" ref="649796088"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">81</int>
- <reference key="object" ref="720053764"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1023925487"/>
- <reference ref="117038363"/>
- <reference ref="49223823"/>
- <reference ref="722745758"/>
- <reference ref="705341025"/>
- <reference ref="1025936716"/>
- <reference ref="294629803"/>
- <reference ref="776162233"/>
- <reference ref="425164168"/>
- <reference ref="579971712"/>
- <reference ref="1010469920"/>
- </object>
- <reference key="parent" ref="379814623"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">75</int>
- <reference key="object" ref="1023925487"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">80</int>
- <reference key="object" ref="117038363"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">78</int>
- <reference key="object" ref="49223823"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">72</int>
- <reference key="object" ref="722745758"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">82</int>
- <reference key="object" ref="705341025"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">124</int>
- <reference key="object" ref="1025936716"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1065607017"/>
- </object>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">77</int>
- <reference key="object" ref="294629803"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">73</int>
- <reference key="object" ref="776162233"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">79</int>
- <reference key="object" ref="425164168"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">112</int>
- <reference key="object" ref="579971712"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">74</int>
- <reference key="object" ref="1010469920"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">125</int>
- <reference key="object" ref="1065607017"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="759406840"/>
- </object>
- <reference key="parent" ref="1025936716"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">126</int>
- <reference key="object" ref="759406840"/>
- <reference key="parent" ref="1065607017"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">205</int>
- <reference key="object" ref="789758025"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="437104165"/>
- <reference ref="583158037"/>
- <reference ref="1058277027"/>
- <reference ref="212016141"/>
- <reference ref="296257095"/>
- <reference ref="29853731"/>
- <reference ref="860595796"/>
- <reference ref="1040322652"/>
- <reference ref="790794224"/>
- <reference ref="892235320"/>
- <reference ref="972420730"/>
- <reference ref="676164635"/>
- <reference ref="507821607"/>
- <reference ref="288088188"/>
- <reference ref="82994268"/>
- </object>
- <reference key="parent" ref="952259628"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">202</int>
- <reference key="object" ref="437104165"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">198</int>
- <reference key="object" ref="583158037"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">207</int>
- <reference key="object" ref="1058277027"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">214</int>
- <reference key="object" ref="212016141"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">199</int>
- <reference key="object" ref="296257095"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">203</int>
- <reference key="object" ref="29853731"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">197</int>
- <reference key="object" ref="860595796"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">206</int>
- <reference key="object" ref="1040322652"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">215</int>
- <reference key="object" ref="790794224"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">218</int>
- <reference key="object" ref="892235320"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="963351320"/>
- </object>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">216</int>
- <reference key="object" ref="972420730"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="769623530"/>
- </object>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">200</int>
- <reference key="object" ref="769623530"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="948374510"/>
- <reference ref="96193923"/>
- <reference ref="679648819"/>
- <reference ref="967646866"/>
- <reference ref="859480356"/>
- <reference ref="795346622"/>
- </object>
- <reference key="parent" ref="972420730"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">219</int>
- <reference key="object" ref="948374510"/>
- <reference key="parent" ref="769623530"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">201</int>
- <reference key="object" ref="96193923"/>
- <reference key="parent" ref="769623530"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">204</int>
- <reference key="object" ref="679648819"/>
- <reference key="parent" ref="769623530"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">220</int>
- <reference key="object" ref="963351320"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="270902937"/>
- <reference ref="88285865"/>
- <reference ref="159080638"/>
- <reference ref="326711663"/>
- <reference ref="447796847"/>
- </object>
- <reference key="parent" ref="892235320"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">213</int>
- <reference key="object" ref="270902937"/>
- <reference key="parent" ref="963351320"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">210</int>
- <reference key="object" ref="88285865"/>
- <reference key="parent" ref="963351320"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">221</int>
- <reference key="object" ref="159080638"/>
- <reference key="parent" ref="963351320"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">208</int>
- <reference key="object" ref="326711663"/>
- <reference key="parent" ref="963351320"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">209</int>
- <reference key="object" ref="447796847"/>
- <reference key="parent" ref="963351320"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">57</int>
- <reference key="object" ref="110575045"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="238522557"/>
- <reference ref="755159360"/>
- <reference ref="908899353"/>
- <reference ref="632727374"/>
- <reference ref="646227648"/>
- <reference ref="609285721"/>
- <reference ref="481834944"/>
- <reference ref="304266470"/>
- <reference ref="1046388886"/>
- <reference ref="1056857174"/>
- <reference ref="342932134"/>
- </object>
- <reference key="parent" ref="694149608"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">58</int>
- <reference key="object" ref="238522557"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">134</int>
- <reference key="object" ref="755159360"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">150</int>
- <reference key="object" ref="908899353"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">136</int>
- <reference key="object" ref="632727374"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">144</int>
- <reference key="object" ref="646227648"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">129</int>
- <reference key="object" ref="609285721"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">143</int>
- <reference key="object" ref="481834944"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">236</int>
- <reference key="object" ref="304266470"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">131</int>
- <reference key="object" ref="1046388886"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="752062318"/>
- </object>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">149</int>
- <reference key="object" ref="1056857174"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">145</int>
- <reference key="object" ref="342932134"/>
- <reference key="parent" ref="110575045"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">130</int>
- <reference key="object" ref="752062318"/>
- <reference key="parent" ref="1046388886"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">24</int>
- <reference key="object" ref="835318025"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="299356726"/>
- <reference ref="625202149"/>
- <reference ref="575023229"/>
- <reference ref="1011231497"/>
- </object>
- <reference key="parent" ref="713487014"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">92</int>
- <reference key="object" ref="299356726"/>
- <reference key="parent" ref="835318025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="625202149"/>
- <reference key="parent" ref="835318025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">239</int>
- <reference key="object" ref="575023229"/>
- <reference key="parent" ref="835318025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">23</int>
- <reference key="object" ref="1011231497"/>
- <reference key="parent" ref="835318025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">295</int>
- <reference key="object" ref="586577488"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="466310130"/>
- </object>
- <reference key="parent" ref="649796088"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">296</int>
- <reference key="object" ref="466310130"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="102151532"/>
- <reference ref="237841660"/>
- </object>
- <reference key="parent" ref="586577488"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">297</int>
- <reference key="object" ref="102151532"/>
- <reference key="parent" ref="466310130"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">298</int>
- <reference key="object" ref="237841660"/>
- <reference key="parent" ref="466310130"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">211</int>
- <reference key="object" ref="676164635"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="785027613"/>
- </object>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">212</int>
- <reference key="object" ref="785027613"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="680220178"/>
- <reference ref="731782645"/>
- </object>
- <reference key="parent" ref="676164635"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">195</int>
- <reference key="object" ref="680220178"/>
- <reference key="parent" ref="785027613"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">196</int>
- <reference key="object" ref="731782645"/>
- <reference key="parent" ref="785027613"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">346</int>
- <reference key="object" ref="967646866"/>
- <reference key="parent" ref="769623530"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">348</int>
- <reference key="object" ref="507821607"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="698887838"/>
- </object>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">349</int>
- <reference key="object" ref="698887838"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="605118523"/>
- <reference ref="197661976"/>
- <reference ref="708854459"/>
- <reference ref="65139061"/>
- <reference ref="19036812"/>
- <reference ref="672708820"/>
- <reference ref="537092702"/>
- </object>
- <reference key="parent" ref="507821607"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">350</int>
- <reference key="object" ref="605118523"/>
- <reference key="parent" ref="698887838"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">351</int>
- <reference key="object" ref="197661976"/>
- <reference key="parent" ref="698887838"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">354</int>
- <reference key="object" ref="708854459"/>
- <reference key="parent" ref="698887838"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">371</int>
- <reference key="object" ref="972006081"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="439893737"/>
- </object>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">372</int>
- <reference key="object" ref="439893737"/>
- <reference key="parent" ref="972006081"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">375</int>
- <reference key="object" ref="302598603"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="941447902"/>
- </object>
- <reference key="parent" ref="649796088"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">376</int>
- <reference key="object" ref="941447902"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="792887677"/>
- <reference ref="215659978"/>
- </object>
- <reference key="parent" ref="302598603"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">377</int>
- <reference key="object" ref="792887677"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="786677654"/>
- </object>
- <reference key="parent" ref="941447902"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">388</int>
- <reference key="object" ref="786677654"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="159677712"/>
- <reference ref="305399458"/>
- <reference ref="814362025"/>
- <reference ref="330926929"/>
- <reference ref="533507878"/>
- <reference ref="158063935"/>
- <reference ref="885547335"/>
- <reference ref="901062459"/>
- <reference ref="767671776"/>
- <reference ref="691570813"/>
- <reference ref="769124883"/>
- <reference ref="739652853"/>
- <reference ref="1012600125"/>
- <reference ref="214559597"/>
- <reference ref="596732606"/>
- <reference ref="393423671"/>
- </object>
- <reference key="parent" ref="792887677"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">389</int>
- <reference key="object" ref="159677712"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">390</int>
- <reference key="object" ref="305399458"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">391</int>
- <reference key="object" ref="814362025"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">392</int>
- <reference key="object" ref="330926929"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">393</int>
- <reference key="object" ref="533507878"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">394</int>
- <reference key="object" ref="158063935"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">395</int>
- <reference key="object" ref="885547335"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">396</int>
- <reference key="object" ref="901062459"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">397</int>
- <reference key="object" ref="767671776"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="175441468"/>
- </object>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">398</int>
- <reference key="object" ref="691570813"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1058217995"/>
- </object>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">399</int>
- <reference key="object" ref="769124883"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="18263474"/>
- </object>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">400</int>
- <reference key="object" ref="739652853"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">401</int>
- <reference key="object" ref="1012600125"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">402</int>
- <reference key="object" ref="214559597"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">403</int>
- <reference key="object" ref="596732606"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">404</int>
- <reference key="object" ref="393423671"/>
- <reference key="parent" ref="786677654"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">405</int>
- <reference key="object" ref="18263474"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="257962622"/>
- <reference ref="644725453"/>
- <reference ref="1037576581"/>
- <reference ref="941806246"/>
- <reference ref="1045724900"/>
- </object>
- <reference key="parent" ref="769124883"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">406</int>
- <reference key="object" ref="257962622"/>
- <reference key="parent" ref="18263474"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">407</int>
- <reference key="object" ref="644725453"/>
- <reference key="parent" ref="18263474"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">408</int>
- <reference key="object" ref="1037576581"/>
- <reference key="parent" ref="18263474"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">409</int>
- <reference key="object" ref="941806246"/>
- <reference key="parent" ref="18263474"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">410</int>
- <reference key="object" ref="1045724900"/>
- <reference key="parent" ref="18263474"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">411</int>
- <reference key="object" ref="1058217995"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="706297211"/>
- <reference ref="568384683"/>
- <reference ref="663508465"/>
- </object>
- <reference key="parent" ref="691570813"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">412</int>
- <reference key="object" ref="706297211"/>
- <reference key="parent" ref="1058217995"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">413</int>
- <reference key="object" ref="568384683"/>
- <reference key="parent" ref="1058217995"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">414</int>
- <reference key="object" ref="663508465"/>
- <reference key="parent" ref="1058217995"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">415</int>
- <reference key="object" ref="175441468"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="252969304"/>
- <reference ref="766922938"/>
- <reference ref="677519740"/>
- <reference ref="238351151"/>
- </object>
- <reference key="parent" ref="767671776"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">416</int>
- <reference key="object" ref="252969304"/>
- <reference key="parent" ref="175441468"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">417</int>
- <reference key="object" ref="766922938"/>
- <reference key="parent" ref="175441468"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">418</int>
- <reference key="object" ref="677519740"/>
- <reference key="parent" ref="175441468"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">419</int>
- <reference key="object" ref="238351151"/>
- <reference key="parent" ref="175441468"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">420</int>
- <reference key="object" ref="755631768"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">450</int>
- <reference key="object" ref="288088188"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="579392910"/>
- </object>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">451</int>
- <reference key="object" ref="579392910"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1060694897"/>
- <reference ref="879586729"/>
- <reference ref="56570060"/>
- </object>
- <reference key="parent" ref="288088188"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">452</int>
- <reference key="object" ref="1060694897"/>
- <reference key="parent" ref="579392910"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">453</int>
- <reference key="object" ref="859480356"/>
- <reference key="parent" ref="769623530"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">454</int>
- <reference key="object" ref="795346622"/>
- <reference key="parent" ref="769623530"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">457</int>
- <reference key="object" ref="65139061"/>
- <reference key="parent" ref="698887838"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">459</int>
- <reference key="object" ref="19036812"/>
- <reference key="parent" ref="698887838"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">460</int>
- <reference key="object" ref="672708820"/>
- <reference key="parent" ref="698887838"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">462</int>
- <reference key="object" ref="537092702"/>
- <reference key="parent" ref="698887838"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">465</int>
- <reference key="object" ref="879586729"/>
- <reference key="parent" ref="579392910"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">466</int>
- <reference key="object" ref="56570060"/>
- <reference key="parent" ref="579392910"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">485</int>
- <reference key="object" ref="82994268"/>
- <reference key="parent" ref="789758025"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">490</int>
- <reference key="object" ref="448692316"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="992780483"/>
- </object>
- <reference key="parent" ref="649796088"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">491</int>
- <reference key="object" ref="992780483"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="105068016"/>
- </object>
- <reference key="parent" ref="448692316"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">492</int>
- <reference key="object" ref="105068016"/>
- <reference key="parent" ref="992780483"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">494</int>
- <reference key="object" ref="976324537"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">496</int>
- <reference key="object" ref="215659978"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="446991534"/>
- </object>
- <reference key="parent" ref="941447902"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">497</int>
- <reference key="object" ref="446991534"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="875092757"/>
- <reference ref="630155264"/>
- <reference ref="945678886"/>
- <reference ref="512868991"/>
- <reference ref="163117631"/>
- <reference ref="31516759"/>
- <reference ref="908105787"/>
- <reference ref="644046920"/>
- <reference ref="231811626"/>
- <reference ref="883618387"/>
- </object>
- <reference key="parent" ref="215659978"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">498</int>
- <reference key="object" ref="875092757"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">499</int>
- <reference key="object" ref="630155264"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">500</int>
- <reference key="object" ref="945678886"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">501</int>
- <reference key="object" ref="512868991"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">502</int>
- <reference key="object" ref="163117631"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">503</int>
- <reference key="object" ref="31516759"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="956096989"/>
- </object>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">504</int>
- <reference key="object" ref="908105787"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">505</int>
- <reference key="object" ref="644046920"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">506</int>
- <reference key="object" ref="231811626"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">507</int>
- <reference key="object" ref="883618387"/>
- <reference key="parent" ref="446991534"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">508</int>
- <reference key="object" ref="956096989"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="257099033"/>
- <reference ref="551969625"/>
- <reference ref="249532473"/>
- <reference ref="607364498"/>
- <reference ref="508151438"/>
- <reference ref="981751889"/>
- <reference ref="380031999"/>
- <reference ref="825984362"/>
- <reference ref="560145579"/>
- </object>
- <reference key="parent" ref="31516759"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">509</int>
- <reference key="object" ref="257099033"/>
- <reference key="parent" ref="956096989"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">510</int>
- <reference key="object" ref="551969625"/>
- <reference key="parent" ref="956096989"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">511</int>
- <reference key="object" ref="249532473"/>
- <reference key="parent" ref="956096989"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">512</int>
- <reference key="object" ref="607364498"/>
- <reference key="parent" ref="956096989"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">513</int>
- <reference key="object" ref="508151438"/>
- <reference key="parent" ref="956096989"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">514</int>
- <reference key="object" ref="981751889"/>
- <reference key="parent" ref="956096989"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">515</int>
- <reference key="object" ref="380031999"/>
- <reference key="parent" ref="956096989"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">516</int>
- <reference key="object" ref="825984362"/>
- <reference key="parent" ref="956096989"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">517</int>
- <reference key="object" ref="560145579"/>
- <reference key="parent" ref="956096989"/>
- </object>
- </object>
- </object>
- <object class="NSMutableDictionary" key="flattenedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>-3.IBPluginDependency</string>
- <string>112.IBPluginDependency</string>
- <string>112.ImportedFromIB2</string>
- <string>124.IBPluginDependency</string>
- <string>124.ImportedFromIB2</string>
- <string>125.IBPluginDependency</string>
- <string>125.ImportedFromIB2</string>
- <string>125.editorWindowContentRectSynchronizationRect</string>
- <string>126.IBPluginDependency</string>
- <string>126.ImportedFromIB2</string>
- <string>129.IBPluginDependency</string>
- <string>129.ImportedFromIB2</string>
- <string>130.IBPluginDependency</string>
- <string>130.ImportedFromIB2</string>
- <string>130.editorWindowContentRectSynchronizationRect</string>
- <string>131.IBPluginDependency</string>
- <string>131.ImportedFromIB2</string>
- <string>134.IBPluginDependency</string>
- <string>134.ImportedFromIB2</string>
- <string>136.IBPluginDependency</string>
- <string>136.ImportedFromIB2</string>
- <string>143.IBPluginDependency</string>
- <string>143.ImportedFromIB2</string>
- <string>144.IBPluginDependency</string>
- <string>144.ImportedFromIB2</string>
- <string>145.IBPluginDependency</string>
- <string>145.ImportedFromIB2</string>
- <string>149.IBPluginDependency</string>
- <string>149.ImportedFromIB2</string>
- <string>150.IBPluginDependency</string>
- <string>150.ImportedFromIB2</string>
- <string>19.IBPluginDependency</string>
- <string>19.ImportedFromIB2</string>
- <string>195.IBPluginDependency</string>
- <string>195.ImportedFromIB2</string>
- <string>196.IBPluginDependency</string>
- <string>196.ImportedFromIB2</string>
- <string>197.IBPluginDependency</string>
- <string>197.ImportedFromIB2</string>
- <string>198.IBPluginDependency</string>
- <string>198.ImportedFromIB2</string>
- <string>199.IBPluginDependency</string>
- <string>199.ImportedFromIB2</string>
- <string>200.IBEditorWindowLastContentRect</string>
- <string>200.IBPluginDependency</string>
- <string>200.ImportedFromIB2</string>
- <string>200.editorWindowContentRectSynchronizationRect</string>
- <string>201.IBPluginDependency</string>
- <string>201.ImportedFromIB2</string>
- <string>202.IBPluginDependency</string>
- <string>202.ImportedFromIB2</string>
- <string>203.IBPluginDependency</string>
- <string>203.ImportedFromIB2</string>
- <string>204.IBPluginDependency</string>
- <string>204.ImportedFromIB2</string>
- <string>205.IBEditorWindowLastContentRect</string>
- <string>205.IBPluginDependency</string>
- <string>205.ImportedFromIB2</string>
- <string>205.editorWindowContentRectSynchronizationRect</string>
- <string>206.IBPluginDependency</string>
- <string>206.ImportedFromIB2</string>
- <string>207.IBPluginDependency</string>
- <string>207.ImportedFromIB2</string>
- <string>208.IBPluginDependency</string>
- <string>208.ImportedFromIB2</string>
- <string>209.IBPluginDependency</string>
- <string>209.ImportedFromIB2</string>
- <string>210.IBPluginDependency</string>
- <string>210.ImportedFromIB2</string>
- <string>211.IBPluginDependency</string>
- <string>211.ImportedFromIB2</string>
- <string>212.IBPluginDependency</string>
- <string>212.ImportedFromIB2</string>
- <string>212.editorWindowContentRectSynchronizationRect</string>
- <string>213.IBPluginDependency</string>
- <string>213.ImportedFromIB2</string>
- <string>214.IBPluginDependency</string>
- <string>214.ImportedFromIB2</string>
- <string>215.IBPluginDependency</string>
- <string>215.ImportedFromIB2</string>
- <string>216.IBPluginDependency</string>
- <string>216.ImportedFromIB2</string>
- <string>217.IBPluginDependency</string>
- <string>217.ImportedFromIB2</string>
- <string>218.IBPluginDependency</string>
- <string>218.ImportedFromIB2</string>
- <string>219.IBPluginDependency</string>
- <string>219.ImportedFromIB2</string>
- <string>220.IBEditorWindowLastContentRect</string>
- <string>220.IBPluginDependency</string>
- <string>220.ImportedFromIB2</string>
- <string>220.editorWindowContentRectSynchronizationRect</string>
- <string>221.IBPluginDependency</string>
- <string>221.ImportedFromIB2</string>
- <string>23.IBPluginDependency</string>
- <string>23.ImportedFromIB2</string>
- <string>236.IBPluginDependency</string>
- <string>236.ImportedFromIB2</string>
- <string>239.IBPluginDependency</string>
- <string>239.ImportedFromIB2</string>
- <string>24.IBEditorWindowLastContentRect</string>
- <string>24.IBPluginDependency</string>
- <string>24.ImportedFromIB2</string>
- <string>24.editorWindowContentRectSynchronizationRect</string>
- <string>29.IBEditorWindowLastContentRect</string>
- <string>29.IBPluginDependency</string>
- <string>29.ImportedFromIB2</string>
- <string>29.WindowOrigin</string>
- <string>29.editorWindowContentRectSynchronizationRect</string>
- <string>295.IBPluginDependency</string>
- <string>296.IBEditorWindowLastContentRect</string>
- <string>296.IBPluginDependency</string>
- <string>296.editorWindowContentRectSynchronizationRect</string>
- <string>297.IBPluginDependency</string>
- <string>298.IBPluginDependency</string>
- <string>346.IBPluginDependency</string>
- <string>346.ImportedFromIB2</string>
- <string>348.IBPluginDependency</string>
- <string>348.ImportedFromIB2</string>
- <string>349.IBEditorWindowLastContentRect</string>
- <string>349.IBPluginDependency</string>
- <string>349.ImportedFromIB2</string>
- <string>349.editorWindowContentRectSynchronizationRect</string>
- <string>350.IBPluginDependency</string>
- <string>350.ImportedFromIB2</string>
- <string>351.IBPluginDependency</string>
- <string>351.ImportedFromIB2</string>
- <string>354.IBPluginDependency</string>
- <string>354.ImportedFromIB2</string>
- <string>371.IBEditorWindowLastContentRect</string>
- <string>371.IBPluginDependency</string>
- <string>371.IBWindowTemplateEditedContentRect</string>
- <string>371.NSWindowTemplate.visibleAtLaunch</string>
- <string>371.editorWindowContentRectSynchronizationRect</string>
- <string>371.windowTemplate.maxSize</string>
- <string>372.IBPluginDependency</string>
- <string>375.IBPluginDependency</string>
- <string>376.IBEditorWindowLastContentRect</string>
- <string>376.IBPluginDependency</string>
- <string>377.IBPluginDependency</string>
- <string>388.IBEditorWindowLastContentRect</string>
- <string>388.IBPluginDependency</string>
- <string>389.IBPluginDependency</string>
- <string>390.IBPluginDependency</string>
- <string>391.IBPluginDependency</string>
- <string>392.IBPluginDependency</string>
- <string>393.IBPluginDependency</string>
- <string>394.IBPluginDependency</string>
- <string>395.IBPluginDependency</string>
- <string>396.IBPluginDependency</string>
- <string>397.IBPluginDependency</string>
- <string>398.IBPluginDependency</string>
- <string>399.IBPluginDependency</string>
- <string>400.IBPluginDependency</string>
- <string>401.IBPluginDependency</string>
- <string>402.IBPluginDependency</string>
- <string>403.IBPluginDependency</string>
- <string>404.IBPluginDependency</string>
- <string>405.IBPluginDependency</string>
- <string>406.IBPluginDependency</string>
- <string>407.IBPluginDependency</string>
- <string>408.IBPluginDependency</string>
- <string>409.IBPluginDependency</string>
- <string>410.IBPluginDependency</string>
- <string>411.IBPluginDependency</string>
- <string>412.IBPluginDependency</string>
- <string>413.IBPluginDependency</string>
- <string>414.IBPluginDependency</string>
- <string>415.IBPluginDependency</string>
- <string>416.IBPluginDependency</string>
- <string>417.IBPluginDependency</string>
- <string>418.IBPluginDependency</string>
- <string>419.IBPluginDependency</string>
- <string>450.IBPluginDependency</string>
- <string>451.IBEditorWindowLastContentRect</string>
- <string>451.IBPluginDependency</string>
- <string>452.IBPluginDependency</string>
- <string>453.IBPluginDependency</string>
- <string>454.IBPluginDependency</string>
- <string>457.IBPluginDependency</string>
- <string>459.IBPluginDependency</string>
- <string>460.IBPluginDependency</string>
- <string>462.IBPluginDependency</string>
- <string>465.IBPluginDependency</string>
- <string>466.IBPluginDependency</string>
- <string>485.IBPluginDependency</string>
- <string>490.IBPluginDependency</string>
- <string>491.IBEditorWindowLastContentRect</string>
- <string>491.IBPluginDependency</string>
- <string>492.IBPluginDependency</string>
- <string>496.IBPluginDependency</string>
- <string>497.IBEditorWindowLastContentRect</string>
- <string>497.IBPluginDependency</string>
- <string>498.IBPluginDependency</string>
- <string>499.IBPluginDependency</string>
- <string>5.IBPluginDependency</string>
- <string>5.ImportedFromIB2</string>
- <string>500.IBPluginDependency</string>
- <string>501.IBPluginDependency</string>
- <string>502.IBPluginDependency</string>
- <string>503.IBPluginDependency</string>
- <string>504.IBPluginDependency</string>
- <string>505.IBPluginDependency</string>
- <string>506.IBPluginDependency</string>
- <string>507.IBPluginDependency</string>
- <string>508.IBEditorWindowLastContentRect</string>
- <string>508.IBPluginDependency</string>
- <string>509.IBPluginDependency</string>
- <string>510.IBPluginDependency</string>
- <string>511.IBPluginDependency</string>
- <string>512.IBPluginDependency</string>
- <string>513.IBPluginDependency</string>
- <string>514.IBPluginDependency</string>
- <string>515.IBPluginDependency</string>
- <string>516.IBPluginDependency</string>
- <string>517.IBPluginDependency</string>
- <string>56.IBPluginDependency</string>
- <string>56.ImportedFromIB2</string>
- <string>57.IBEditorWindowLastContentRect</string>
- <string>57.IBPluginDependency</string>
- <string>57.ImportedFromIB2</string>
- <string>57.editorWindowContentRectSynchronizationRect</string>
- <string>58.IBPluginDependency</string>
- <string>58.ImportedFromIB2</string>
- <string>72.IBPluginDependency</string>
- <string>72.ImportedFromIB2</string>
- <string>73.IBPluginDependency</string>
- <string>73.ImportedFromIB2</string>
- <string>74.IBPluginDependency</string>
- <string>74.ImportedFromIB2</string>
- <string>75.IBPluginDependency</string>
- <string>75.ImportedFromIB2</string>
- <string>77.IBPluginDependency</string>
- <string>77.ImportedFromIB2</string>
- <string>78.IBPluginDependency</string>
- <string>78.ImportedFromIB2</string>
- <string>79.IBPluginDependency</string>
- <string>79.ImportedFromIB2</string>
- <string>80.IBPluginDependency</string>
- <string>80.ImportedFromIB2</string>
- <string>81.IBEditorWindowLastContentRect</string>
- <string>81.IBPluginDependency</string>
- <string>81.ImportedFromIB2</string>
- <string>81.editorWindowContentRectSynchronizationRect</string>
- <string>82.IBPluginDependency</string>
- <string>82.ImportedFromIB2</string>
- <string>83.IBPluginDependency</string>
- <string>83.ImportedFromIB2</string>
- <string>92.IBPluginDependency</string>
- <string>92.ImportedFromIB2</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{522, 812}, {146, 23}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{436, 809}, {64, 6}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{753, 187}, {275, 113}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{608, 612}, {275, 83}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{547, 180}, {254, 283}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{187, 434}, {243, 243}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{608, 612}, {167, 43}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{753, 217}, {238, 103}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{608, 612}, {241, 103}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{654, 239}, {194, 73}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{525, 802}, {197, 73}}</string>
- <string>{{380, 836}, {512, 20}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{74, 862}</string>
- <string>{{6, 978}, {478, 20}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{604, 269}, {231, 43}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{475, 832}, {234, 43}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{746, 287}, {220, 133}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{608, 612}, {215, 63}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{380, 496}, {480, 360}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{380, 496}, {480, 360}}</string>
- <integer value="1"/>
- <string>{{33, 99}, {480, 360}}</string>
- <string>{3.40282e+38, 3.40282e+38}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{591, 420}, {83, 43}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{523, 2}, {178, 283}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{753, 197}, {170, 63}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{725, 289}, {246, 23}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{674, 260}, {204, 183}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{878, 180}, {164, 173}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{286, 129}, {275, 183}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{23, 794}, {245, 183}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{452, 109}, {196, 203}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{145, 474}, {199, 203}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- </object>
- </object>
- <object class="NSMutableDictionary" key="unlocalizedProperties">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="activeLocalization"/>
- <object class="NSMutableDictionary" key="localizations">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- <nil key="sourceID"/>
- <int key="maxID">532</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">TestAppAppDelegate</string>
- <string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">window</string>
- <string key="NS.object.0">NSWindow</string>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">TestAppAppDelegate.h</string>
- </object>
- </object>
- </object>
- <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <string key="superclassName">NSResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="822405504">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="850738725">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="624831158">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSHelpManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSPageLayout.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSUserInterfaceItemSearching.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSBrowser</string>
- <string key="superclassName">NSControl</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSBrowser.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSControl</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="310914472">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSDocument</string>
- <string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>printDocument:</string>
- <string>revertDocumentToSaved:</string>
- <string>runPageLayout:</string>
- <string>saveDocument:</string>
- <string>saveDocumentAs:</string>
- <string>saveDocumentTo:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSDocument.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSDocument</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSDocumentScripting.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSDocumentController</string>
- <string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>clearRecentDocuments:</string>
- <string>newDocument:</string>
- <string>openDocument:</string>
- <string>saveAllDocuments:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSDocumentController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSFontManager</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="946436764">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSFontManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSFormatter</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSMatrix</string>
- <string key="superclassName">NSControl</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSMatrix.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSMenu</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="1056362899">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSMenuItem</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="472958451">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSMenuItem.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSMovieView</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSMovieView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSAccessibility.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="822405504"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="850738725"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="624831158"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="310914472"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSDictionaryController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSDragging.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="946436764"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSFontPanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSKeyValueBinding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="1056362899"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSNibLoading.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSOutlineView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSPasteboard.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSSavePanel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="809545482">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSTableView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="260078765">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSArchiver.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSClassDescription.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSObjectScripting.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSPortCoder.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSScriptClassDescription.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSScriptWhoseTests.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURLDownload.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSInterfaceStyle.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSResponder</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSResponder.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSTableView</string>
- <string key="superclassName">NSControl</string>
- <reference key="sourceIdentifier" ref="809545482"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSText</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSText.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSTextView</string>
- <string key="superclassName">NSText</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSTextView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSClipView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <reference key="sourceIdentifier" ref="472958451"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSRulerView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSView</string>
- <string key="superclassName">NSResponder</string>
- <reference key="sourceIdentifier" ref="260078765"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSWindow</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSDrawer.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSWindow</string>
- <string key="superclassName">NSResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSWindow.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSWindow</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSWindowScripting.h</string>
- </object>
- </object>
- </object>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <integer value="1060" key="NS.object.0"/>
- </object>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
- <integer value="3000" key="NS.object.0"/>
- </object>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">../TestApp.xcodeproj</string>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- </data>
-</archive>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.google.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>ause</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import <Cocoa/Cocoa.h>
-
-@interface TestAppAppDelegate : NSObject <NSApplicationDelegate> {
- NSWindow *window;
-}
-
-@property (assign) IBOutlet NSWindow *window;
-
-@end
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "TestAppAppDelegate.h"
-
-@implementation TestAppAppDelegate
-
-@synthesize window;
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
- // Insert code here to initialize your application
-}
-
-@end
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import <Cocoa/Cocoa.h>
-
-int main(int argc, char *argv[])
-{
- return NSApplicationMain(argc, (const char **) argv);
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'dep_framework',
- 'product_name': 'Dependency Framework',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'empty.c', ],
- },
- {
- 'target_name': 'test_app',
- 'product_name': 'Test App Gyp',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'dependencies': [ 'dep_framework', ],
- 'sources': [
- 'TestApp/main.m',
- 'TestApp/TestApp_Prefix.pch',
- 'TestApp/TestAppAppDelegate.h',
- 'TestApp/TestAppAppDelegate.m',
- ],
- 'mac_bundle_resources': [
- 'TestApp/English.lproj/InfoPlist.strings',
- 'TestApp/English.lproj/MainMenu.xib',
- ],
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
- ],
- },
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist',
- },
- },
- ],
-}
+++ /dev/null
-/* Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-int x = 1;
+++ /dev/null
-/* Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-#include <stdio.h>
-extern int x;
-int main() {
- printf("hello, world %d\n", x);
-}
-
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'lib',
- 'product_name': 'Test64',
- 'type': 'static_library',
- 'sources': [ 'my_file.cc' ],
- 'xcode_settings': {
- 'ARCHS': [ 'x86_64' ],
- },
- },
- {
- 'target_name': 'exe',
- 'product_name': 'Test64',
- 'type': 'executable',
- 'dependencies': [ 'lib' ],
- 'sources': [ 'my_main_file.cc' ],
- 'xcode_settings': {
- 'ARCHS': [ 'x86_64' ],
- },
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'lib',
- 'product_name': 'Test',
- 'type': 'static_library',
- 'sources': [ 'my_file.cc' ],
- },
- {
- 'target_name': 'exe',
- 'product_name': 'Test',
- 'type': 'executable',
- 'dependencies': [ 'lib' ],
- 'sources': [ 'my_main_file.cc' ],
- },
- ]
-}
+++ /dev/null
-#ifdef CFLAG
-#error CFLAG should not be set
-#endif
-
-#ifndef CCFLAG
-#error CCFLAG should be set
-#endif
+++ /dev/null
-#ifndef CFLAG
-#error CFLAG should be set
-#endif
-
-#ifndef CCFLAG
-#error CCFLAG should be set
-#endif
+++ /dev/null
-#ifndef CFLAG
-#error CFLAG should be set
-#endif
-
-#ifdef CCFLAG
-#error CCFLAG should not be set
-#endif
+++ /dev/null
-#ifdef CFLAG
-#error CFLAG should not be set
-#endif
-
-#ifndef CCFLAG
-#error CCFLAG should be set
-#endif
+++ /dev/null
-#ifndef CFLAG
-#error CFLAG should be set
-#endif
-
-#ifndef CCFLAG
-#error CCFLAG should be set
-#endif
+++ /dev/null
-#ifdef CFLAG
-#error CFLAG should not be set
-#endif
-
-#ifndef CCFLAG
-#error CCFLAG should be set
-#endif
+++ /dev/null
-#ifndef CFLAG
-#error CFLAG should be set
-#endif
-
-#ifndef CCFLAG
-#error CCFLAG should be set
-#endif
+++ /dev/null
-#ifndef CFLAG
-#error CFLAG should be set
-#endif
-
-#ifdef CCFLAG
-#error CCFLAG should not be set
-#endif
+++ /dev/null
-#ifdef CFLAG
-#error CFLAG should not be set
-#endif
-
-#ifndef CCFLAG
-#error CCFLAG should be set
-#endif
+++ /dev/null
-#ifndef CFLAG
-#error CFLAG should be set
-#endif
-
-#ifndef CCFLAG
-#error CCFLAG should be set
-#endif
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'mytarget',
- 'type': 'shared_library',
- 'sources': [
- 'cfile.c',
- 'mfile.m',
- 'ccfile.cc',
- 'cppfile.cpp',
- 'cxxfile.cxx',
- 'mmfile.mm',
- ],
- 'xcode_settings': {
- # Normally, defines would go in 'defines' instead. This is just for
- # testing.
- 'OTHER_CFLAGS': [
- '-DCFLAG',
- ],
- 'OTHER_CPLUSPLUSFLAGS': [
- '-DCCFLAG',
- ],
- 'GCC_C_LANGUAGE_STANDARD': 'c99',
- },
- },
- {
- 'target_name': 'mytarget_reuse_cflags',
- 'type': 'shared_library',
- 'sources': [
- 'cfile.c',
- 'mfile.m',
- 'ccfile_withcflags.cc',
- 'cppfile_withcflags.cpp',
- 'cxxfile_withcflags.cxx',
- 'mmfile_withcflags.mm',
- ],
- 'xcode_settings': {
- 'OTHER_CFLAGS': [
- '-DCFLAG',
- ],
- 'OTHER_CPLUSPLUSFLAGS': [
- '$OTHER_CFLAGS',
- '-DCCFLAG',
- ],
- # This is a C-only flag, to check these don't get added to C++ files.
- 'GCC_C_LANGUAGE_STANDARD': 'c99',
- },
- },
- {
- 'target_name': 'mytarget_inherit_cflags',
- 'type': 'shared_library',
- 'sources': [
- 'cfile.c',
- 'mfile.m',
- 'ccfile_withcflags.cc',
- 'cppfile_withcflags.cpp',
- 'cxxfile_withcflags.cxx',
- 'mmfile_withcflags.mm',
- ],
- 'xcode_settings': {
- 'OTHER_CFLAGS': [
- '-DCFLAG',
- ],
- 'OTHER_CPLUSPLUSFLAGS': [
- '$inherited',
- '-DCCFLAG',
- ],
- 'GCC_C_LANGUAGE_STANDARD': 'c99',
- },
- },
- {
- 'target_name': 'mytarget_inherit_cflags_parens',
- 'type': 'shared_library',
- 'sources': [
- 'cfile.c',
- 'mfile.m',
- 'ccfile_withcflags.cc',
- 'cppfile_withcflags.cpp',
- 'cxxfile_withcflags.cxx',
- 'mmfile_withcflags.mm',
- ],
- 'xcode_settings': {
- 'OTHER_CFLAGS': [
- '-DCFLAG',
- ],
- 'OTHER_CPLUSPLUSFLAGS': [
- '$(inherited)',
- '-DCCFLAG',
- ],
- 'GCC_C_LANGUAGE_STANDARD': 'c99',
- },
- },
- {
- 'target_name': 'mytarget_inherit_cflags_braces',
- 'type': 'shared_library',
- 'sources': [
- 'cfile.c',
- 'mfile.m',
- 'ccfile_withcflags.cc',
- 'cppfile_withcflags.cpp',
- 'cxxfile_withcflags.cxx',
- 'mmfile_withcflags.mm',
- ],
- 'xcode_settings': {
- 'OTHER_CFLAGS': [
- '-DCFLAG',
- ],
- 'OTHER_CPLUSPLUSFLAGS': [
- '${inherited}',
- '-DCCFLAG',
- ],
- 'GCC_C_LANGUAGE_STANDARD': 'c99',
- },
- },
- ],
-}
+++ /dev/null
-int main() {}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'my_dylib',
- 'type': 'shared_library',
- 'sources': [ 'empty.c', ],
- },
- {
- 'target_name': 'test_app',
- 'product_name': 'Test App',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'dependencies': [ 'my_dylib', ],
- 'sources': [
- 'empty.c',
- ],
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/Test App.app/Contents/Resources',
- 'files': [
- '<(PRODUCT_DIR)/libmy_dylib.dylib',
- ],
- },
- ],
- },
- ],
-}
-
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-void f() {}
-int main() {}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'nonbundle_static_library',
- 'type': 'static_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
- {
- 'target_name': 'nonbundle_shared_library',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
- {
- 'target_name': 'nonbundle_loadable_module',
- 'type': 'loadable_module',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
- {
- 'target_name': 'nonbundle_executable',
- 'type': 'executable',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
-
- {
- 'target_name': 'bundle_shared_library',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
- {
- 'target_name': 'bundle_loadable_module',
- 'type': 'loadable_module',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
- {
- 'target_name': 'my_app',
- 'product_name': 'My App',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
- ],
-}
+++ /dev/null
-/* Localized versions of Info.plist keys */
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>NSPrincipalClass</key>
- <string></string>
-</dict>
-</plist>
+++ /dev/null
-int f() { return 42; }
+++ /dev/null
-int f();
-int main() {
- return f();
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'my_bundle',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'bundle.c' ],
- 'mac_bundle_resources': [
- 'English.lproj/InfoPlist.strings',
- ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- }
- },
- {
- 'target_name': 'dependent_on_bundle',
- 'type': 'executable',
- 'sources': [ 'executable.c' ],
- 'dependencies': [
- 'my_bundle',
- ],
- },
- ],
-}
-
+++ /dev/null
-/* Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-int CalculatePerformExpression(char* expr,
- int significantDigits,
- int flags,
- char* answer);
-
-int main() {
- char buffer[1024];
- return CalculatePerformExpression("42", 1, 0, buffer);
-}
-
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'calculate',
- 'type': 'executable',
- 'sources': [
- 'calculate.c',
- ],
- 'libraries': [
- '/System/Library/PrivateFrameworks/Calculate.framework',
- ],
- 'mac_framework_dirs': [
- '/System/Library/PrivateFrameworks',
- ],
- },
- ],
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import <Foundation/Foundation.h>
-
-@interface TestObject : NSObject
-@end
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "myframework.h"
-
-@implementation TestObject
-@end
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_framework_headers_framework',
- 'product_name': 'TestFramework',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [
- 'myframework.h',
- 'myframework.m',
- ],
- 'mac_framework_headers': [
- 'myframework.h',
- ],
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
- ],
- },
- },{
- 'target_name': 'test_framework_headers_static',
- 'product_name': 'TestLibrary',
- 'type': 'static_library',
- 'xcode_settings': {
- 'PUBLIC_HEADERS_FOLDER_PATH': 'include',
- },
- 'sources': [
- 'myframework.h',
- 'myframework.m',
- ],
- 'mac_framework_headers': [
- 'myframework.h',
- ],
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
- ],
- },
- },
- ],
-}
+++ /dev/null
-/* Localized versions of Info.plist keys */
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>NSPrincipalClass</key>
- <string></string>
-</dict>
-</plist>
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import <Cocoa/Cocoa.h>
-
-#ifdef __cplusplus
-struct ObjCVectorImp;
-#else
-typedef struct _ObjCVectorImpT ObjCVectorImp;
-#endif
-
-@interface ObjCVector : NSObject {
- @private
- ObjCVectorImp* imp_;
-}
-
-- (id)init;
-
-- (void)addObject:(id)obj;
-- (void)addObject:(id)obj atIndex:(NSUInteger)index;
-
-- (void)removeObject:(id)obj;
-- (void)removeObjectAtIndex:(NSUInteger)index;
-
-- (id)objectAtIndex:(NSUInteger)index;
-
-@end
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "ObjCVectorInternal.h"
-#import "ObjCVector.h"
-
-#include <vector>
-
-@interface ObjCVector (Private)
-- (std::vector<id>::iterator)makeIterator:(NSUInteger)index;
-@end
-
-@implementation ObjCVector
-
-- (id)init {
- if ((self = [super init])) {
- imp_ = new ObjCVectorImp();
- }
- return self;
-}
-
-- (void)dealloc {
- delete imp_;
- [super dealloc];
-}
-
-- (void)addObject:(id)obj {
- imp_->v.push_back([obj retain]);
-}
-
-- (void)addObject:(id)obj atIndex:(NSUInteger)index {
- imp_->v.insert([self makeIterator:index], [obj retain]);
-}
-
-- (void)removeObject:(id)obj {
- for (std::vector<id>::iterator it = imp_->v.begin();
- it != imp_->v.end();
- ++it) {
- if ([*it isEqual:obj]) {
- [*it autorelease];
- imp_->v.erase(it);
- return;
- }
- }
-}
-
-- (void)removeObjectAtIndex:(NSUInteger)index {
- [imp_->v[index] autorelease];
- imp_->v.erase([self makeIterator:index]);
-}
-
-- (id)objectAtIndex:(NSUInteger)index {
- return imp_->v[index];
-}
-
-- (std::vector<id>::iterator)makeIterator:(NSUInteger)index {
- std::vector<id>::iterator it = imp_->v.begin();
- it += index;
- return it;
-}
-
-@end
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <vector>
-
-struct ObjCVectorImp {
- std::vector<id> v;
-};
+++ /dev/null
-//
-// Prefix header for all source files of the 'TestFramework' target in the 'TestFramework' project.
-//
-
-#ifdef __OBJC__
- #import <Cocoa/Cocoa.h>
-#endif
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'dep_framework',
- 'product_name': 'Dependency Bundle',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'empty.c', ],
- },
- {
- 'target_name': 'test_framework',
- 'product_name': 'Test Framework',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'dependencies': [ 'dep_framework', ],
- 'sources': [
- 'TestFramework/ObjCVector.h',
- 'TestFramework/ObjCVectorInternal.h',
- 'TestFramework/ObjCVector.mm',
- ],
- 'mac_framework_headers': [
- 'TestFramework/ObjCVector.h',
- ],
- 'mac_bundle_resources': [
- 'TestFramework/English.lproj/InfoPlist.strings',
- ],
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
- ],
- },
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'TestFramework/Info.plist',
- 'GCC_DYNAMIC_NO_PIC': 'NO',
- },
- 'copies': [
- # Test copying to a file that has envvars in its dest path.
- # Needs to be in a mac_bundle target, else CONTENTS_FOLDER_PATH isn't
- # set.
- {
- 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries',
- 'files': [
- 'empty.c',
- ],
- },
- ],
- },
- {
- 'target_name': 'copy_target',
- 'type': 'none',
- 'dependencies': [ 'test_framework', 'dep_framework', ],
- 'copies': [
- # Test copying directories with spaces in src and dest paths.
- {
- 'destination': '<(PRODUCT_DIR)/Test Framework.framework/foo',
- 'files': [
- '<(PRODUCT_DIR)/Dependency Bundle.framework',
- ],
- },
- ],
- 'actions': [
- {
- 'action_name': 'aektschn',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/touched_file'],
- 'action': ['touch', '${BUILT_PRODUCTS_DIR}/action_file'],
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'dir1_target',
- 'type': 'none',
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'dir2_target',
- 'type': 'none',
- 'dependencies': [
- '../dir1/dir1.gyp:dir1_target',
- ],
- 'actions': [
- {
- 'inputs': [ ],
- 'outputs': [ '<(PRODUCT_DIR)/file.txt' ],
- 'action_name': 'Test action',
- 'action': ['cp', 'file.txt', '${BUILT_PRODUCTS_DIR}/file.txt' ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that env vars work with actions, with relative directory paths.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'action-envvars'
- test.run_gyp('action/action.gyp', chdir=CHDIR)
- test.build('action/action.gyp', 'action', chdir=CHDIR, SYMROOT='../build')
-
- result_file = test.built_file_path('result', chdir=CHDIR)
- test.must_exist(result_file)
- test.must_contain(result_file, 'Test output')
-
- other_result_file = test.built_file_path('other_result', chdir=CHDIR)
- test.must_exist(other_result_file)
- test.must_contain(other_result_file, 'Other output')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that app bundles are built correctly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='app-bundle')
-
- test.build('test.gyp', test.ALL, chdir='app-bundle')
-
- # Binary
- test.built_file_must_exist('Test App Gyp.app/Contents/MacOS/Test App Gyp',
- chdir='app-bundle')
-
- # Info.plist
- info_plist = test.built_file_path('Test App Gyp.app/Contents/Info.plist',
- chdir='app-bundle')
- test.must_exist(info_plist)
- test.must_contain(info_plist, 'com.google.Test App Gyp') # Variable expansion
-
- # Resources
- test.built_file_must_exist(
- 'Test App Gyp.app/Contents/Resources/English.lproj/InfoPlist.strings',
- chdir='app-bundle')
- test.built_file_must_exist(
- 'Test App Gyp.app/Contents/Resources/English.lproj/MainMenu.nib',
- chdir='app-bundle')
-
- # Packaging
- test.built_file_must_exist('Test App Gyp.app/Contents/PkgInfo',
- chdir='app-bundle')
- test.built_file_must_match('Test App Gyp.app/Contents/PkgInfo', 'APPLause',
- chdir='app-bundle')
-
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Tests things related to ARCHS.
-"""
-
-import TestGyp
-
-import subprocess
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- def CheckFileType(file, expected):
- proc = subprocess.Popen(['file', '-b', file], stdout=subprocess.PIPE)
- o = proc.communicate()[0].strip()
- assert not proc.returncode
- if o != expected:
- print 'File: Expected %s, got %s' % (expected, o)
- test.fail_test()
-
- test.run_gyp('test-no-archs.gyp', chdir='archs')
- test.build('test-no-archs.gyp', test.ALL, chdir='archs')
- result_file = test.built_file_path('Test', chdir='archs')
- test.must_exist(result_file)
- CheckFileType(result_file, 'Mach-O executable i386')
-
- test.run_gyp('test-archs-x86_64.gyp', chdir='archs')
- test.build('test-archs-x86_64.gyp', test.ALL, chdir='archs')
- result_file = test.built_file_path('Test64', chdir='archs')
- test.must_exist(result_file)
- CheckFileType(result_file, 'Mach-O 64-bit executable x86_64')
+++ /dev/null
-
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that compile-time flags work.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
- CHDIR = 'cflags'
- test.run_gyp('test.gyp', chdir=CHDIR)
- test.build('test.gyp', test.ALL, chdir=CHDIR)
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that 'copies' with app bundles are handled correctly.
-"""
-
-import TestGyp
-
-import os
-import sys
-import time
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('framework.gyp', chdir='framework')
-
- test.build('framework.gyp', 'copy_target', chdir='framework')
-
- # Check that the copy succeeded.
- test.built_file_must_exist(
- 'Test Framework.framework/foo/Dependency Bundle.framework',
- chdir='framework')
- test.built_file_must_exist(
- 'Test Framework.framework/foo/Dependency Bundle.framework/Versions/A',
- chdir='framework')
- test.built_file_must_exist(
- 'Test Framework.framework/Versions/A/Libraries/empty.c',
- chdir='framework')
-
-
- # Check that rebuilding the target a few times works.
- dep_bundle = test.built_file_path('Dependency Bundle.framework',
- chdir='framework')
- mtime = os.path.getmtime(dep_bundle)
- atime = os.path.getatime(dep_bundle)
- for i in range(3):
- os.utime(dep_bundle, (atime + i * 1000, mtime + i * 1000))
- test.build('framework.gyp', 'copy_target', chdir='framework')
-
-
- # Check that actions ran.
- test.built_file_must_exist('action_file', chdir='framework')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that dylibs can be copied into app bundles.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='copy-dylib')
-
- test.build('test.gyp', 'test_app', chdir='copy-dylib')
-
- test.built_file_must_exist(
- 'Test App.app/Contents/Resources/libmy_dylib.dylib', chdir='copy-dylib')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Tests things related to debug information generation.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='debuginfo')
-
- test.build('test.gyp', test.ALL, chdir='debuginfo')
-
- test.built_file_must_exist('libnonbundle_shared_library.dylib.dSYM',
- chdir='debuginfo')
- test.built_file_must_exist('nonbundle_loadable_module.so.dSYM',
- chdir='debuginfo')
- test.built_file_must_exist('nonbundle_executable.dSYM',
- chdir='debuginfo')
-
- test.built_file_must_exist('bundle_shared_library.framework.dSYM',
- chdir='debuginfo')
- test.built_file_must_exist('bundle_loadable_module.bundle.dSYM',
- chdir='debuginfo')
- test.built_file_must_exist('My App.app.dSYM',
- chdir='debuginfo')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a dependency on a bundle causes the whole bundle to be built.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='depend-on-bundle')
-
- test.build('test.gyp', 'dependent_on_bundle', chdir='depend-on-bundle')
-
- # Binary itself.
- test.built_file_must_exist('dependent_on_bundle', chdir='depend-on-bundle')
-
- # Bundle dependency.
- test.built_file_must_exist(
- 'my_bundle.framework/Versions/A/my_bundle',
- chdir='depend-on-bundle')
- test.built_file_must_exist( # package_framework
- 'my_bundle.framework/my_bundle',
- chdir='depend-on-bundle')
- test.built_file_must_exist( # plist
- 'my_bundle.framework/Versions/A/Resources/Info.plist',
- chdir='depend-on-bundle')
- test.built_file_must_exist(
- 'my_bundle.framework/Versions/A/Resources/English.lproj/' # Resources
- 'InfoPlist.strings',
- chdir='depend-on-bundle')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that it is possible to build an object that depends on a
-PrivateFramework.
-"""
-
-import os
-import sys
-import TestGyp
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'framework-dirs'
- test.run_gyp('framework-dirs.gyp', chdir=CHDIR)
- test.build('framework-dirs.gyp', 'calculate', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that mac_framework_headers works properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- # TODO(thakis): Make this work with ninja, make. http://crbug.com/129013
- test = TestGyp.TestGyp(formats=['xcode'])
-
- CHDIR = 'framework-headers'
- test.run_gyp('test.gyp', chdir=CHDIR)
-
- # Test that headers are installed for frameworks
- test.build('test.gyp', 'test_framework_headers_framework', chdir=CHDIR)
-
- test.built_file_must_exist(
- 'TestFramework.framework/Versions/A/TestFramework', chdir=CHDIR)
-
- test.built_file_must_exist(
- 'TestFramework.framework/Versions/A/Headers/myframework.h', chdir=CHDIR)
-
- # Test that headers are installed for static libraries.
- test.build('test.gyp', 'test_framework_headers_static', chdir=CHDIR)
-
- test.built_file_must_exist('libTestLibrary.a', chdir=CHDIR)
-
- test.built_file_must_exist('include/myframework.h', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that app bundles are built correctly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('framework.gyp', chdir='framework')
-
- test.build('framework.gyp', 'test_framework', chdir='framework')
-
- # Binary
- test.built_file_must_exist(
- 'Test Framework.framework/Versions/A/Test Framework',
- chdir='framework')
-
- # Info.plist
- test.built_file_must_exist(
- 'Test Framework.framework/Versions/A/Resources/Info.plist',
- chdir='framework')
-
- # Resources
- test.built_file_must_exist(
- 'Test Framework.framework/Versions/A/Resources/English.lproj/'
- 'InfoPlist.strings',
- chdir='framework')
-
- # Symlinks created by packaging process
- test.built_file_must_exist('Test Framework.framework/Versions/Current',
- chdir='framework')
- test.built_file_must_exist('Test Framework.framework/Resources',
- chdir='framework')
- test.built_file_must_exist('Test Framework.framework/Test Framework',
- chdir='framework')
- # PkgInfo.
- test.built_file_must_not_exist(
- 'Test Framework.framework/Versions/A/Resources/PkgInfo',
- chdir='framework')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that the global xcode_settings processing doesn't throw.
-Regression test for http://crbug.com/109163
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
- test.run_gyp('src/dir2/dir2.gyp', chdir='global-settings', depth='src')
- # run_gyp shouldn't throw.
-
- # Check that BUILT_PRODUCTS_DIR was set correctly, too.
- test.build('dir2/dir2.gyp', 'dir2_target', chdir='global-settings/src',
- SYMROOT='../build')
- test.built_file_must_exist('file.txt', chdir='global-settings/src')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies the Info.plist preprocessor functionality.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'infoplist-process'
- INFO_PLIST_PATH = 'Test.app/Contents/Info.plist'
-
- # First process both keys.
- test.set_configuration('One')
- test.run_gyp('test1.gyp', chdir=CHDIR)
- test.build('test1.gyp', test.ALL, chdir=CHDIR)
- info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR)
- test.must_exist(info_plist)
- test.must_contain(info_plist, 'Foo')
- test.must_contain(info_plist, 'Bar')
-
- # Then process a single key.
- test.set_configuration('Two')
- test.run_gyp('test2.gyp', chdir=CHDIR)
- test.build('test2.gyp', chdir=CHDIR)
- info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR)
- test.must_exist(info_plist)
- test.must_contain(info_plist, 'com.google.Test') # Normal expansion works.
- test.must_contain(info_plist, 'Foo (Bar)')
- test.must_contain(info_plist, 'PROCESSED_KEY2')
-
- # Then turn off the processor.
- test.set_configuration('Three')
- test.run_gyp('test3.gyp', chdir=CHDIR)
- test.build('test3.gyp', chdir=CHDIR)
- info_plist = test.built_file_path('Test App.app/Contents/Info.plist',
- chdir=CHDIR)
- test.must_exist(info_plist)
- test.must_contain(info_plist, 'com.google.Test') # Normal expansion works.
- test.must_contain(info_plist, 'PROCESSED_KEY1')
- test.must_contain(info_plist, 'PROCESSED_KEY2')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled
-correctly.
-"""
-
-import TestGyp
-
-import re
-import subprocess
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'installname'
- test.run_gyp('test.gyp', chdir=CHDIR)
- test.build('test.gyp', test.ALL, chdir=CHDIR)
-
- def GetInstallname(p):
- p = test.built_file_path(p, chdir=CHDIR)
- r = re.compile(r'cmd LC_ID_DYLIB.*?name (.*?) \(offset \d+\)', re.DOTALL)
- proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE)
- o = proc.communicate()[0]
- assert not proc.returncode
- m = r.search(o)
- assert m
- return m.group(1)
-
- if (GetInstallname('libdefault_installname.dylib') !=
- '/usr/local/lib/libdefault_installname.dylib'):
- test.fail_test()
-
- if (GetInstallname('My Framework.framework/My Framework') !=
- '/Library/Frameworks/My Framework.framework/'
- 'Versions/A/My Framework'):
- test.fail_test()
-
- if (GetInstallname('libexplicit_installname.dylib') !=
- 'Trapped in a dynamiclib factory'):
- test.fail_test()
-
- if (GetInstallname('libexplicit_installname_base.dylib') !=
- '@executable_path/../../../libexplicit_installname_base.dylib'):
- test.fail_test()
-
- if (GetInstallname('My Other Framework.framework/My Other Framework') !=
- '@executable_path/../../../My Other Framework.framework/'
- 'Versions/A/My Other Framework'):
- test.fail_test()
-
- if (GetInstallname('libexplicit_installname_with_base.dylib') !=
- '/usr/local/lib/libexplicit_installname_with_base.dylib'):
- test.fail_test()
-
- if (GetInstallname('libexplicit_installname_with_explicit_base.dylib') !=
- '@executable_path/../libexplicit_installname_with_explicit_base.dylib'):
- test.fail_test()
-
- if (GetInstallname('libboth_base_and_installname.dylib') !=
- 'Still trapped in a dynamiclib factory'):
- test.fail_test()
-
- if (GetInstallname('install_name_with_info_plist.framework/'
- 'install_name_with_info_plist') !=
- '/Library/Frameworks/install_name_with_info_plist.framework/'
- 'Versions/A/install_name_with_info_plist'):
- test.fail_test()
-
- if ('DYLIB_INSTALL_NAME_BASE:standardizepath: command not found' in
- test.stdout()):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that OTHER_LDFLAGS is passed to libtool.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'],
- match = lambda a, b: True)
-
- build_error_code = {
- 'xcode': 1,
- 'make': 2,
- 'ninja': 1,
- }[test.format]
-
- CHDIR = 'ldflags-libtool'
- test.run_gyp('test.gyp', chdir=CHDIR)
-
- test.build('test.gyp', 'ldflags_passed_to_libtool', chdir=CHDIR,
- status=build_error_code)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that filenames passed to various linker flags are converted into
-build-directory relative paths correctly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'ldflags'
- test.run_gyp('subdirectory/test.gyp', chdir=CHDIR)
-
- test.build('subdirectory/test.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
-
-
-# These flags from `man ld` couldl show up in OTHER_LDFLAGS and need path
-# translation.
-#
-# Done:
-# -exported_symbols_list filename
-# -unexported_symbols_list file
-# -reexported_symbols_list file
-# -sectcreate segname sectname file
-#
-# Will be done on demand:
-# -weak_library path_to_library
-# -reexport_library path_to_library
-# -lazy_library path_to_library
-# -upward_library path_to_library
-# -syslibroot rootdir
-# -framework name[,suffix]
-# -weak_framework name[,suffix]
-# -reexport_framework name[,suffix]
-# -lazy_framework name[,suffix]
-# -upward_framework name[,suffix]
-# -force_load path_to_archive
-# -filelist file[,dirname]
-# -dtrace file
-# -order_file file # should use ORDER_FILE
-# -exported_symbols_order file
-# -bundle_loader executable # should use BUNDLE_LOADER
-# -alias_list filename
-# -seg_addr_table filename
-# -dylib_file install_name:file_name
-# -interposable_list filename
-# -object_path_lto filename
-#
-#
-# obsolete:
-# -sectorder segname sectname orderfile
-# -seg_addr_table_filename path
-#
-#
-# ??:
-# -map map_file_path
-# -sub_library library_name
-# -sub_umbrella framework_name
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies libraries (in link_settings) are properly found.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('subdir/test.gyp', chdir='libraries')
-
- test.build('subdir/test.gyp', test.ALL, chdir='libraries')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Tests that a loadable_module target is built correctly.
-"""
-
-import TestGyp
-
-import os
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='loadable-module')
- test.build('test.gyp', test.ALL, chdir='loadable-module')
-
- # Binary.
- test.built_file_must_exist(
- 'test_loadable_module.plugin/Contents/MacOS/test_loadable_module',
- chdir='loadable-module')
-
- # Info.plist.
- info_plist = test.built_file_path(
- 'test_loadable_module.plugin/Contents/Info.plist',
- chdir='loadable-module')
- test.must_exist(info_plist)
- test.must_contain(info_plist, """
- <key>CFBundleExecutable</key>
- <string>test_loadable_module</string>
-""")
-
- # PkgInfo.
- test.built_file_must_not_exist(
- 'test_loadable_module.plugin/Contents/PkgInfo',
- chdir='loadable-module')
- test.built_file_must_not_exist(
- 'test_loadable_module.plugin/Contents/Resources',
- chdir='loadable-module')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that an Info.plist with CFBundleSignature works.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='missing-cfbundlesignature')
- test.build('test.gyp', test.ALL, chdir='missing-cfbundlesignature')
-
- test.built_file_must_match('mytarget.app/Contents/PkgInfo', 'APPL????',
- chdir='missing-cfbundlesignature')
-
- test.built_file_must_match('myothertarget.app/Contents/PkgInfo', 'APPL????',
- chdir='missing-cfbundlesignature')
-
- test.built_file_must_match('thirdtarget.app/Contents/PkgInfo', 'APPL????',
- chdir='missing-cfbundlesignature')
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that list xcode_settings are flattened before being exported to the
-environment.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'non-strs-flattened-to-env'
- INFO_PLIST_PATH = 'Test.app/Contents/Info.plist'
-
- test.run_gyp('test.gyp', chdir=CHDIR)
- test.build('test.gyp', test.ALL, chdir=CHDIR)
- info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR)
- test.must_exist(info_plist)
- test.must_contain(info_plist, '''\
-\t<key>My Variable</key>
-\t<string>some expansion</string>''')
- test.must_contain(info_plist, '''\
-\t<key>CFlags</key>
-\t<string>-fstack-protector-all -fno-strict-aliasing -DS="A Space"</string>''')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that objc settings are handled correctly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- # set |match| to ignore build stderr output.
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'],
- match = lambda a, b: True)
-
- CHDIR = 'objc-gc'
- test.run_gyp('test.gyp', chdir=CHDIR)
-
- build_error_code = {
- 'xcode': [1, 65], # Linker error code. 1 on Xcode 3, 65 on Xcode 4
- 'make': 2,
- 'ninja': 1,
- }[test.format]
-
- test.build('test.gyp', 'gc_exe_fails', chdir=CHDIR, status=build_error_code)
- test.build(
- 'test.gyp', 'gc_off_exe_req_lib', chdir=CHDIR, status=build_error_code)
-
- test.build('test.gyp', 'gc_req_exe', chdir=CHDIR)
- test.run_built_executable('gc_req_exe', chdir=CHDIR, stdout="gc on: 1\n")
-
- test.build('test.gyp', 'gc_exe_req_lib', chdir=CHDIR)
- test.run_built_executable('gc_exe_req_lib', chdir=CHDIR, stdout="gc on: 1\n")
-
- test.build('test.gyp', 'gc_exe', chdir=CHDIR)
- test.run_built_executable('gc_exe', chdir=CHDIR, stdout="gc on: 1\n")
-
- test.build('test.gyp', 'gc_off_exe', chdir=CHDIR)
- test.run_built_executable('gc_off_exe', chdir=CHDIR, stdout="gc on: 0\n")
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a postbuild copying a dependend framework into an app bundle is
-rerun if the resources in the framework change.
-"""
-
-import TestGyp
-
-import os.path
-import sys
-
-if sys.platform == 'darwin':
- # TODO(thakis): Make this pass with the make generator, http://crbug.com/95529
- test = TestGyp.TestGyp(formats=['ninja', 'xcode'])
-
- CHDIR = 'postbuild-copy-bundle'
- test.run_gyp('test.gyp', chdir=CHDIR)
-
- app_bundle_dir = test.built_file_path('Test app.app', chdir=CHDIR)
- bundled_framework_dir = os.path.join(
- app_bundle_dir, 'Contents', 'My Framework.framework', 'Resources')
- final_plist_path = os.path.join(bundled_framework_dir, 'Info.plist')
- final_resource_path = os.path.join(bundled_framework_dir, 'resource_file.sb')
-
- # Check that the dependency was built and copied into the app bundle:
- test.build('test.gyp', 'test_app', chdir=CHDIR)
- test.must_exist(final_resource_path)
- test.must_match(final_resource_path,
- 'This is included in the framework bundle.\n')
-
- test.must_exist(final_plist_path)
- test.must_contain(final_plist_path, '''\
-\t<key>RandomKey</key>
-\t<string>RandomValue</string>''')
-
- # Touch the dependency's bundle resource, and check that the modification
- # makes it all the way into the app bundle:
- test.sleep()
- test.write('postbuild-copy-bundle/resource_file.sb', 'New text\n')
- test.build('test.gyp', 'test_app', chdir=CHDIR)
-
- test.must_exist(final_resource_path)
- test.must_match(final_resource_path, 'New text\n')
-
- # Check the same for the plist file.
- test.sleep()
- contents = test.read('postbuild-copy-bundle/Framework-Info.plist')
- contents = contents.replace('RandomValue', 'NewRandomValue')
- test.write('postbuild-copy-bundle/Framework-Info.plist', contents)
- test.build('test.gyp', 'test_app', chdir=CHDIR)
-
- test.must_exist(final_plist_path)
- test.must_contain(final_plist_path, '''\
-\t<key>RandomKey</key>
-\t<string>NewRandomValue</string>''')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a postbuild invoking |defaults| works.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'postbuild-defaults'
- test.run_gyp('test.gyp', chdir=CHDIR)
- test.build('test.gyp', test.ALL, chdir=CHDIR)
-
- result_file = test.built_file_path('result', chdir=CHDIR)
- test.must_exist(result_file)
- test.must_contain(result_file, '''\
-Test
-${PRODUCT_NAME}
-''')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a failing postbuild step lets the build fail.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- # set |match| to ignore build stderr output.
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'],
- match = lambda a, b: True)
-
- test.run_gyp('test.gyp', chdir='postbuild-fail')
-
- build_error_code = {
- 'xcode': 1,
- 'make': 2,
- 'ninja': 1,
- }[test.format]
-
-
- # If a postbuild fails, all postbuilds should be re-run on the next build.
- # However, even if the first postbuild fails the other postbuilds are still
- # executed.
-
-
- # Non-bundles
- test.build('test.gyp', 'nonbundle', chdir='postbuild-fail',
- status=build_error_code)
- test.built_file_must_exist('static_touch',
- chdir='postbuild-fail')
- # Check for non-up-to-date-ness by checking if building again produces an
- # error.
- test.build('test.gyp', 'nonbundle', chdir='postbuild-fail',
- status=build_error_code)
-
-
- # Bundles
- test.build('test.gyp', 'bundle', chdir='postbuild-fail',
- status=build_error_code)
- test.built_file_must_exist('dynamic_touch',
- chdir='postbuild-fail')
- # Check for non-up-to-date-ness by checking if building again produces an
- # error.
- test.build('test.gyp', 'bundle', chdir='postbuild-fail',
- status=build_error_code)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a postbuild work in projects with multiple configurations.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'postbuild-multiple-configurations'
- test.run_gyp('test.gyp', chdir=CHDIR)
-
- for configuration in ['Debug', 'Release']:
- test.set_configuration(configuration)
- test.build('test.gyp', test.ALL, chdir=CHDIR)
- test.built_file_must_exist('postbuild-file', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a postbuilds on static libraries work, and that sourceless
-libraries don't cause failures at gyp time.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['make', 'xcode'])
-
- CHDIR = 'postbuild-static-library'
- test.run_gyp('test.gyp', chdir=CHDIR)
- test.build('test.gyp', 'my_lib', chdir=CHDIR)
- # Building my_sourceless_lib doesn't work with make. gyp should probably
- # forbid sourceless static libraries, since they're pretty pointless.
- # But they shouldn't cause gyp time exceptions.
-
- test.built_file_must_exist('postbuild-file', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that postbuild steps work.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='postbuilds')
-
- test.build('test.gyp', test.ALL, chdir='postbuilds')
-
- # See comment in test/subdirectory/gyptest-subdir-default.py
- if test.format == 'xcode':
- chdir = 'postbuilds/subdirectory'
- else:
- chdir = 'postbuilds'
-
- # Created by the postbuild scripts
- test.built_file_must_exist('el.a_touch',
- type=test.STATIC_LIB,
- chdir='postbuilds')
- test.built_file_must_exist('el.a_gyp_touch',
- type=test.STATIC_LIB,
- chdir='postbuilds')
- test.built_file_must_exist('nest_el.a_touch',
- type=test.STATIC_LIB,
- chdir=chdir)
- test.built_file_must_exist(
- 'dyna.framework/Versions/A/dyna_touch',
- chdir='postbuilds')
- test.built_file_must_exist(
- 'dyna.framework/Versions/A/dyna_gyp_touch',
- chdir='postbuilds')
- test.built_file_must_exist(
- 'nest_dyna.framework/Versions/A/nest_dyna_touch',
- chdir=chdir)
- test.built_file_must_exist('dyna_standalone.dylib_gyp_touch',
- type=test.SHARED_LIB,
- chdir='postbuilds')
- test.built_file_must_exist('copied_file.txt', chdir='postbuilds')
- test.built_file_must_exist('copied_file_2.txt', chdir=chdir)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that GCC_PREFIX_HEADER works.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
- test.run_gyp('test.gyp', chdir='prefixheader')
- test.build('test.gyp', test.ALL, chdir='prefixheader')
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that app bundles are rebuilt correctly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'rebuild'
- test.run_gyp('test.gyp', chdir=CHDIR)
-
- test.build('test.gyp', 'test_app', chdir=CHDIR)
-
- # Touch a source file, rebuild, and check that the app target is up-to-date.
- test.touch('rebuild/main.c')
- test.build('test.gyp', 'test_app', chdir=CHDIR)
-
- test.up_to_date('test.gyp', 'test_app', chdir=CHDIR)
-
- # Xcode runs postbuilds on every build, so targets with postbuilds are
- # never marked as up_to_date.
- if test.format != 'xcode':
- # Same for a framework bundle.
- test.build('test.gyp', 'test_framework_postbuilds', chdir=CHDIR)
- test.up_to_date('test.gyp', 'test_framework_postbuilds', chdir=CHDIR)
-
- # Test that an app bundle with a postbuild that touches the app binary needs
- # to be built only once.
- test.build('test.gyp', 'test_app_postbuilds', chdir=CHDIR)
- test.up_to_date('test.gyp', 'test_app_postbuilds', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled
-correctly.
-"""
-
-import TestGyp
-
-import re
-import subprocess
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'rpath'
- test.run_gyp('test.gyp', chdir=CHDIR)
- test.build('test.gyp', test.ALL, chdir=CHDIR)
-
- def GetRpaths(p):
- p = test.built_file_path(p, chdir=CHDIR)
- r = re.compile(r'cmd LC_RPATH.*?path (.*?) \(offset \d+\)', re.DOTALL)
- proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE)
- o = proc.communicate()[0]
- assert not proc.returncode
- return r.findall(o)
-
- if (GetRpaths('libdefault_rpath.dylib') != []):
- test.fail_test()
-
- if (GetRpaths('libexplicit_rpath.dylib') != ['@executable_path/.']):
- test.fail_test()
-
- if (GetRpaths('libexplicit_rpaths_escaped.dylib') !=
- ['First rpath', 'Second rpath']):
- test.fail_test()
-
- if (GetRpaths('My Framework.framework/My Framework') != ['@loader_path/.']):
- test.fail_test()
-
- if (GetRpaths('executable') != ['@executable_path/.']):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that setting SDKROOT works.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='sdkroot')
- test.build('test.gyp', test.ALL, chdir='sdkroot')
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that bundles that have no 'sources' (pure resource containers) work.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='sourceless-module')
-
- # Just needs to build without errors.
- test.build('test.gyp', 'empty_bundle', chdir='sourceless-module')
- test.built_file_must_not_exist(
- 'empty_bundle.bundle', chdir='sourceless-module')
-
- # Needs to build, and contain a resource.
- test.build('test.gyp', 'resource_bundle', chdir='sourceless-module')
-
- test.built_file_must_exist(
- 'resource_bundle.bundle/Contents/Resources/foo.manifest',
- chdir='sourceless-module')
- test.built_file_must_not_exist(
- 'resource_bundle.bundle/Contents/MacOS/resource_bundle',
- chdir='sourceless-module')
-
- # Needs to build and cause the bundle to be built.
- test.build(
- 'test.gyp', 'dependent_on_resource_bundle', chdir='sourceless-module')
-
- test.built_file_must_exist(
- 'resource_bundle.bundle/Contents/Resources/foo.manifest',
- chdir='sourceless-module')
- test.built_file_must_not_exist(
- 'resource_bundle.bundle/Contents/MacOS/resource_bundle',
- chdir='sourceless-module')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that stripping works.
-"""
-
-import TestGyp
-
-import re
-import subprocess
-import sys
-import time
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='strip')
-
- test.build('test.gyp', test.ALL, chdir='strip')
-
- # Lightweight check if stripping was done.
- def OutPath(s):
- return test.built_file_path(s, type=test.SHARED_LIB, chdir='strip')
-
- def CheckNsyms(p, n_expected):
- r = re.compile(r'nsyms\s+(\d+)')
- proc = subprocess.Popen(['otool', '-l', p], stdout=subprocess.PIPE)
- o = proc.communicate()[0]
- assert not proc.returncode
- m = r.search(o)
- n = int(m.group(1))
- if n != n_expected:
- print 'Stripping: Expected %d symbols, got %d' % (n_expected, n)
- test.fail_test()
-
- # The actual numbers here are not interesting, they just need to be the same
- # in both the xcode and the make build.
- CheckNsyms(OutPath('no_postprocess'), 11)
- CheckNsyms(OutPath('no_strip'), 11)
- CheckNsyms(OutPath('strip_all'), 0)
- CheckNsyms(OutPath('strip_nonglobal'), 2)
- CheckNsyms(OutPath('strip_debugging'), 3)
- CheckNsyms(OutPath('strip_all_custom_flags'), 0)
- CheckNsyms(test.built_file_path(
- 'strip_all_bundle.framework/Versions/A/strip_all_bundle', chdir='strip'),
- 0)
- CheckNsyms(OutPath('strip_save'), 3)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test that MACH_O_TYPE etc are set correctly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- test.run_gyp('test.gyp', chdir='type_envvars')
-
- test.build('test.gyp', test.ALL, chdir='type_envvars')
-
- # The actual test is done by postbuild scripts during |test.build()|.
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that dependent Xcode settings are processed correctly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'xcode-env-order'
- INFO_PLIST_PATH = 'Test.app/Contents/Info.plist'
-
- test.run_gyp('test.gyp', chdir=CHDIR)
- test.build('test.gyp', test.ALL, chdir=CHDIR)
-
- # Env vars in 'copies' filenames.
- test.built_file_must_exist('Test-copy-brace/main.c', chdir=CHDIR)
- test.built_file_must_exist('Test-copy-paren/main.c', chdir=CHDIR)
- test.built_file_must_exist('Test-copy-bare/main.c', chdir=CHDIR)
-
- # Env vars in 'actions' filenames and inline actions
- test.built_file_must_exist('action-copy-brace.txt', chdir=CHDIR)
- test.built_file_must_exist('action-copy-paren.txt', chdir=CHDIR)
- test.built_file_must_exist('action-copy-bare.txt', chdir=CHDIR)
-
- # Env vars in 'rules' filenames and inline actions
- test.built_file_must_exist('rule-copy-brace.txt', chdir=CHDIR)
- test.built_file_must_exist('rule-copy-paren.txt', chdir=CHDIR)
- # TODO: see comment in test.gyp for this file.
- #test.built_file_must_exist('rule-copy-bare.txt', chdir=CHDIR)
-
- # Env vars in Info.plist.
- info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR)
- test.must_exist(info_plist)
-
- test.must_contain(info_plist, '''\
-\t<key>BraceProcessedKey1</key>
-\t<string>D:/Source/Project/Test</string>''')
- test.must_contain(info_plist, '''\
-\t<key>BraceProcessedKey2</key>
-\t<string>/Source/Project/Test</string>''')
- test.must_contain(info_plist, '''\
-\t<key>BraceProcessedKey3</key>
-\t<string>com.apple.product-type.application:D:/Source/Project/Test</string>''')
-
- test.must_contain(info_plist, '''\
-\t<key>ParenProcessedKey1</key>
-\t<string>D:/Source/Project/Test</string>''')
- test.must_contain(info_plist, '''\
-\t<key>ParenProcessedKey2</key>
-\t<string>/Source/Project/Test</string>''')
- test.must_contain(info_plist, '''\
-\t<key>ParenProcessedKey3</key>
-\t<string>com.apple.product-type.application:D:/Source/Project/Test</string>''')
-
- test.must_contain(info_plist, '''\
-\t<key>BareProcessedKey1</key>
-\t<string>D:/Source/Project/Test</string>''')
- test.must_contain(info_plist, '''\
-\t<key>BareProcessedKey2</key>
-\t<string>/Source/Project/Test</string>''')
- # NOTE: For bare variables, $PRODUCT_TYPE is not replaced! It _is_ replaced
- # if it's not right at the start of the string (e.g. ':$PRODUCT_TYPE'), so
- # this looks like an Xcode bug. This bug isn't emulated (yet?), so check this
- # only for Xcode.
- if test.format == 'xcode':
- test.must_contain(info_plist, '''\
-\t<key>BareProcessedKey3</key>
-\t<string>$PRODUCT_TYPE:D:/Source/Project/Test</string>''')
-
- test.must_contain(info_plist, '''\
-\t<key>MixedProcessedKey</key>
-\t<string>/Source/Project:Test:mh_execute</string>''')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that xcode-style GCC_... settings are handled properly.
-"""
-
-import TestGyp
-
-import sys
-
-def IgnoreOutput(string, expected_string):
- return True
-
-if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
- CHDIR = 'xcode-gcc'
- test.run_gyp('test.gyp', chdir=CHDIR)
-
- # List of targets that'll pass. It expects targets of the same name with
- # '-fail' appended that'll fail to build.
- targets = [
- 'warn_about_invalid_offsetof_macro',
- 'warn_about_missing_newline',
- ]
-
- for target in targets:
- test.build('test.gyp', target, chdir=CHDIR)
- test.built_file_must_exist(target, chdir=CHDIR)
- fail_target = target + '-fail'
- test.build('test.gyp', fail_target, chdir=CHDIR, status=None,
- stderr=None, match=IgnoreOutput)
- test.built_file_must_not_exist(fail_target, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.google.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
- <key>ProcessedKey1</key>
- <string>PROCESSED_KEY1</string>
- <key>ProcessedKey2</key>
- <string>PROCESSED_KEY2</string>
-</dict>
-</plist>
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_app',
- 'product_name': 'Test',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [
- 'main.c',
- ],
- 'configurations': {
- 'One': {
- },
- },
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- 'INFOPLIST_PREPROCESS': 'YES',
- 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'PROCESSED_KEY1=Foo PROCESSED_KEY2=Bar',
- },
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_app',
- 'product_name': 'Test',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [
- 'main.c',
- ],
- 'configurations': {
- 'Two': {
- },
- },
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- 'INFOPLIST_PREPROCESS': 'YES',
- 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'PROCESSED_KEY1="Foo (Bar)"',
- },
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_app',
- 'product_name': 'Test App',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [
- 'main.c',
- ],
- 'configurations': {
- 'Three': {
- },
- },
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- 'INFOPLIST_PREPROCESS': 'NO',
- 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'PROCESSED_KEY1=Foo',
- },
- },
- ],
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>NSPrincipalClass</key>
- <string></string>
-</dict>
-</plist>
+++ /dev/null
-int f() { return 0; }
+++ /dev/null
-int main() {}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'default_installname',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- },
- {
- 'target_name': 'default_bundle_installname',
- 'product_name': 'My Framework',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c' ],
- },
- {
- 'target_name': 'explicit_installname',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- 'LD_DYLIB_INSTALL_NAME': 'Trapped in a dynamiclib factory',
- },
- },
- {
- 'target_name': 'explicit_installname_base',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
-
- },
- },
- {
- 'target_name': 'explicit_installname_base_bundle',
- 'product_name': 'My Other Framework',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
-
- },
- },
- {
- 'target_name': 'both_base_and_installname',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- # LD_DYLIB_INSTALL_NAME wins.
- 'LD_DYLIB_INSTALL_NAME': 'Still trapped in a dynamiclib factory',
- 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
- },
- },
- {
- 'target_name': 'explicit_installname_with_base',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)',
- },
- },
- {
- 'target_name': 'explicit_installname_with_explicit_base',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- 'DYLIB_INSTALL_NAME_BASE': '@executable_path/..',
- 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)',
- },
- },
- {
- 'target_name': 'executable',
- 'type': 'executable',
- 'sources': [ 'main.c' ],
- 'xcode_settings': {
- 'LD_DYLIB_INSTALL_NAME': 'Should be ignored for not shared_lib',
- },
- },
- # Regression test for http://crbug.com/113918
- {
- 'target_name': 'install_name_with_info_plist',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)',
- },
- },
- ],
-}
+++ /dev/null
-void f() {}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'ldflags_passed_to_libtool',
- 'type': 'static_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-fblorfen-horf-does-not-exist',
- ],
- },
- },
- ],
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleSignature</key>
- <string>????</string>
-</dict>
-</plist>
+++ /dev/null
-void f() {}
-void g() {}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'raw',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-exported_symbols_list symbol_list.def',
- '-sectcreate __TEXT __info_plist Info.plist',
- ],
- },
- },
- # TODO(thakis): This form should ideally be supported, too. (But
- # -Wlfoo,bar,baz is cleaner so people should use that anyway.)
- #{
- # 'target_name': 'raw_sep',
- # 'type': 'shared_library',
- # 'sources': [ 'file.c', ],
- # 'xcode_settings': {
- # 'OTHER_LDFLAGS': [
- # '-exported_symbols_list', 'symbol_list.def',
- # '-sectcreate', '__TEXT', '__info_plist', 'Info.plist',
- # ],
- # },
- #},
- {
- 'target_name': 'wl_space',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- # Works because clang passes unknown files on to the linker.
- '-Wl,-exported_symbols_list symbol_list.def',
- ],
- },
- },
- # TODO(thakis): This form should ideally be supported, too. (But
- # -Wlfoo,bar,baz is cleaner so people should use that anyway.)
- #{
- # 'target_name': 'wl_space_sep',
- # 'type': 'shared_library',
- # 'sources': [ 'file.c', ],
- # 'xcode_settings': {
- # 'OTHER_LDFLAGS': [
- # # Works because clang passes unknown files on to the linker.
- # '-Wl,-exported_symbols_list', 'symbol_list.def',
- # ],
- # },
- #},
- {
- 'target_name': 'wl_comma',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-Wl,-exported_symbols_list,symbol_list.def',
- '-Wl,-sectcreate,__TEXT,__info_plist,Info.plist',
- ],
- },
- },
- ],
-}
+++ /dev/null
-Make things live in a subdirectory, to make sure that DEPTH works correctly.
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <iostream>
-
-int main() {
- std::cout << "Hello, world!" << std::endl;
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int my_foo(int x) {
- return x + 1;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'libraries-test',
- 'type': 'executable',
- 'sources': [
- 'hello.cc',
- ],
- 'link_settings': {
- 'libraries': [
- 'libcrypto.dylib',
- 'libfl.a',
- ],
- },
- },
- {
- # This creates a static library and puts it in a nonstandard location for
- # libraries-search-path-test.
- 'target_name': 'mylib',
- 'type': 'static_library',
- 'sources': [
- 'mylib.c',
- ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Make a secret location',
- 'action': [
- 'mkdir',
- '-p',
- '${SRCROOT}/../secret_location',
- ],
- },
- {
- 'postbuild_name': 'Copy to secret location, with secret name',
- 'action': [
- 'cp',
- '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
- '${SRCROOT}/../secret_location/libmysecretlib.a',
- ],
- },
- ],
- },
- {
- 'target_name': 'libraries-search-path-test',
- 'type': 'executable',
- 'dependencies': [ 'mylib' ],
- 'sources': [
- 'hello.cc',
- ],
- 'xcode_settings': {
- 'LIBRARY_SEARCH_PATHS': [
- '<(DEPTH)/secret_location',
- ],
- },
- 'link_settings': {
- 'libraries': [
- 'libmysecretlib.a',
- ],
- },
- },
- ],
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIdentifier</key>
- <string>com.google.test_loadable_module</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>BRPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>CFPlugInDynamicRegisterFunction</key>
- <string></string>
- <key>CFPlugInDynamicRegistration</key>
- <string>NO</string>
-</dict>
-</plist>
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int SuperFly() {
- return 42;
-}
-
-const char* SuperFoo() {
- return "Hello World";
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_loadable_module',
- 'type': 'loadable_module',
- 'mac_bundle': 1,
- 'sources': [ 'module.c' ],
- 'product_extension': 'plugin',
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- },
- },
- ],
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
-</dict>
-</plist>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>F</string>
-</dict>
-</plist>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>some really long string</string>
-</dict>
-</plist>
+++ /dev/null
-int main() {}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'mytarget',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- },
- },
- {
- 'target_name': 'myothertarget',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Other-Info.plist',
- },
- },
- {
- 'target_name': 'thirdtarget',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Third-Info.plist',
- },
- },
- ],
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <!-- Not a valid plist file since it's missing so much. That's fine. -->
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>My Variable</key>
- <string>${MY_VAR}</string>
- <key>CFlags</key>
- <string>${OTHER_CFLAGS}</string>
-</dict>
-</plist>
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_app',
- 'product_name': 'Test',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [ 'main.c', ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- 'MY_VAR': 'some expansion',
- 'OTHER_CFLAGS': [
- # Just some (more than one) random flags.
- '-fstack-protector-all',
- '-fno-strict-aliasing',
- '-DS="A Space"', # Would normally be in 'defines'
- ],
- },
- },
- ],
-}
+++ /dev/null
-void c_fun() {}
+++ /dev/null
-void cc_fun() {}
+++ /dev/null
-#import <Foundation/Foundation.h>
-
-int main() {
- printf("gc on: %d\n", [NSGarbageCollector defaultCollector] != NULL);
- return 0;
-}
+++ /dev/null
-void objcpp_fun() { }
+++ /dev/null
-void objc_fun() { }
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- # For some reason, static_library targets that are built with gc=required
- # and then linked to executables that don't use gc, the linker doesn't
- # complain. For shared_libraries it does, so use that.
- {
- 'target_name': 'no_gc_lib',
- 'type': 'shared_library',
- 'sources': [
- 'c-file.c',
- 'cc-file.cc',
- 'needs-gc-mm.mm',
- 'needs-gc.m',
- ],
- },
- {
- 'target_name': 'gc_lib',
- 'type': 'shared_library',
- 'sources': [
- 'c-file.c',
- 'cc-file.cc',
- 'needs-gc-mm.mm',
- 'needs-gc.m',
- ],
- 'xcode_settings': {
- 'GCC_ENABLE_OBJC_GC': 'supported',
- },
- },
- {
- 'target_name': 'gc_req_lib',
- 'type': 'shared_library',
- 'sources': [
- 'c-file.c',
- 'cc-file.cc',
- 'needs-gc-mm.mm',
- 'needs-gc.m',
- ],
- 'xcode_settings': {
- 'GCC_ENABLE_OBJC_GC': 'required',
- },
- },
-
- {
- 'target_name': 'gc_exe_fails',
- 'type': 'executable',
- 'sources': [ 'main.m' ],
- 'dependencies': [ 'no_gc_lib' ],
- 'xcode_settings': {
- 'GCC_ENABLE_OBJC_GC': 'required',
- },
- 'libraries': [ 'Foundation.framework' ],
- },
- {
- 'target_name': 'gc_req_exe',
- 'type': 'executable',
- 'sources': [ 'main.m' ],
- 'dependencies': [ 'gc_lib' ],
- 'xcode_settings': {
- 'GCC_ENABLE_OBJC_GC': 'required',
- },
- 'libraries': [ 'Foundation.framework' ],
- },
- {
- 'target_name': 'gc_exe_req_lib',
- 'type': 'executable',
- 'sources': [ 'main.m' ],
- 'dependencies': [ 'gc_req_lib' ],
- 'xcode_settings': {
- 'GCC_ENABLE_OBJC_GC': 'supported',
- },
- 'libraries': [ 'Foundation.framework' ],
- },
- {
- 'target_name': 'gc_exe',
- 'type': 'executable',
- 'sources': [ 'main.m' ],
- 'dependencies': [ 'gc_lib' ],
- 'xcode_settings': {
- 'GCC_ENABLE_OBJC_GC': 'supported',
- },
- 'libraries': [ 'Foundation.framework' ],
- },
- {
- 'target_name': 'gc_off_exe_req_lib',
- 'type': 'executable',
- 'sources': [ 'main.m' ],
- 'dependencies': [ 'gc_req_lib' ],
- 'libraries': [ 'Foundation.framework' ],
- },
- {
- 'target_name': 'gc_off_exe',
- 'type': 'executable',
- 'sources': [ 'main.m' ],
- 'dependencies': [ 'gc_lib' ],
- 'libraries': [ 'Foundation.framework' ],
- },
- ],
-}
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>NSPrincipalClass</key>
- <string></string>
- <key>RandomKey</key>
- <string>RandomValue</string>
-</dict>
-</plist>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.google.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-int main() {}
+++ /dev/null
-#!/bin/bash
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-rsync -acC --delete "$1" "$2"
+++ /dev/null
-This is included in the framework bundle.
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_bundle',
- 'product_name': 'My Framework',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'empty.c', ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Framework-Info.plist',
- },
- 'mac_bundle_resources': [
- 'resource_file.sb',
- ],
- },
- {
- 'target_name': 'test_app',
- 'product_name': 'Test App',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'dependencies': [
- 'test_bundle',
- ],
- 'sources': [ 'main.c', ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'TestApp-Info.plist',
- },
- 'postbuilds': [
- {
- 'postbuild_name': 'Copy dependent framework into app',
- 'action': [
- './postbuild-copy-framework.sh',
- '${BUILT_PRODUCTS_DIR}/My Framework.framework',
- '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <!-- Not a valid plist file since it's missing so much. That's fine. -->
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
-</dict>
-</plist>
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-# This is the built Info.plist in the output directory.
-PLIST="${BUILT_PRODUCTS_DIR}"/Test.app/Contents/Info # No trailing .plist
-echo $(defaults read "${PLIST}" "CFBundleName") > "${BUILT_PRODUCTS_DIR}/result"
-
-# This is the source Info.plist next to this script file.
-PLIST="${SRCROOT}"/Info # No trailing .plist
-echo $(defaults read "${PLIST}" "CFBundleName") \
- >> "${BUILT_PRODUCTS_DIR}/result"
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_app',
- 'product_name': 'Test',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [ 'main.c', ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- },
- 'postbuilds': [
- {
- 'postbuild_name': 'Postbuild that calls defaults',
- 'action': [
- './postbuild-defaults.sh',
- '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// That's right, this is copyrighted.
-void f() {}
+++ /dev/null
-#!/usr/bin/bash
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-exit 1
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'nonbundle',
- 'type': 'static_library',
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Postbuild Fail',
- 'action': [ './postbuild-fail.sh', ],
- },
- {
- 'postbuild_name': 'Runs after failing postbuild',
- 'action': [ './touch-static.sh', ],
- },
- ],
- },
- {
- 'target_name': 'bundle',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Postbuild Fail',
- 'action': [ './postbuild-fail.sh', ],
- },
- {
- 'postbuild_name': 'Runs after failing postbuild',
- 'action': [ './touch-dynamic.sh', ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-touch "${BUILT_PRODUCTS_DIR}/dynamic_touch"
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-touch "${BUILT_PRODUCTS_DIR}/static_touch"
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-int main() {}
+++ /dev/null
-#!/bin/bash
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-touch "${BUILT_PRODUCTS_DIR}/postbuild-file"
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'target_defaults': {
- 'configurations': {
- 'Debug': {},
- 'Release': {},
- },
- },
- 'targets': [
- {
- 'target_name': 'random_target',
- 'type': 'executable',
- 'sources': [ 'main.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Touch a file.',
- 'action': [
- './postbuild-touch-file.sh',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-void f() {}
+++ /dev/null
-#!/bin/bash
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-touch "${BUILT_PRODUCTS_DIR}/$1"
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'my_lib',
- 'type': 'static_library',
- 'sources': [ 'empty.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Postbuild that touches a file',
- 'action': [
- './postbuild-touch-file.sh', 'postbuild-file'
- ],
- },
- ],
- },
-
- {
- 'target_name': 'my_sourceless_lib',
- 'type': 'static_library',
- 'dependencies': [ 'my_lib' ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Postbuild that touches a file',
- 'action': [
- './postbuild-touch-file.sh', 'postbuild-file-sourceless'
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/bin/bash
-
-cp "$@"
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-void f() {}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-void g() {}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-void h() {}
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-lib="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"
-nm ${lib} > /dev/null # Just make sure this works.
-
-pattern="${1}"
-
-if [ $pattern != "a|b" ]; then
- echo "Parameter quoting is broken"
- exit 1
-fi
-
-if [ "${2}" != "arg with spaces" ]; then
- echo "Parameter space escaping is broken"
- exit 1
-fi
-
-touch "${lib}"_touch
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-lib="${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}"
-nm ${lib} > /dev/null # Just make sure this works.
-
-pattern="${1}"
-
-if [ $pattern != "a|b" ]; then
- echo "Parameter quote escaping is broken"
- exit 1
-fi
-
-if [ "${2}" != "arg with spaces" ]; then
- echo "Parameter space escaping is broken"
- exit 1
-fi
-
-touch "${lib}"_touch.a
+++ /dev/null
-This file should be copied to the products dir.
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'nest_el',
- 'type': 'static_library',
- 'sources': [ '../file_g.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Static library postbuild',
- 'variables': {
- 'some_regex': 'a|b',
- },
- 'action': [
- '../script/static_library_postbuild.sh',
- '<(some_regex)',
- 'arg with spaces',
- ],
- },
- ],
- },
- {
- 'target_name': 'nest_dyna',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ '../file_h.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Dynamic library postbuild',
- 'variables': {
- 'some_regex': 'a|b',
- },
- 'action': [
- '../script/shared_library_postbuild.sh',
- '<(some_regex)',
- 'arg with spaces',
- ],
- },
- {
- 'postbuild_name': 'Test paths relative to gyp file',
- 'action': [
- '../copy.sh',
- './copied_file.txt',
- '${BUILT_PRODUCTS_DIR}/copied_file_2.txt',
- ],
- },
- ],
- },
- ],
-}
-
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'el',
- 'type': 'static_library',
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Static library postbuild',
- 'variables': {
- 'some_regex': 'a|b',
- },
- 'action': [
- 'script/static_library_postbuild.sh',
- '<(some_regex)',
- 'arg with spaces',
- ],
- },
- {
- 'postbuild_name': 'Test variable in gyp file',
- 'action': [
- 'cp',
- '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
- '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}_gyp_touch.a',
- ],
- },
- ],
- },
- {
- 'target_name': 'dyna',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'dependencies': [
- 'subdirectory/nested_target.gyp:nest_dyna',
- 'subdirectory/nested_target.gyp:nest_el',
- ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Dynamic library postbuild',
- 'variables': {
- 'some_regex': 'a|b',
- },
- 'action': [
- 'script/shared_library_postbuild.sh',
- '<(some_regex)',
- 'arg with spaces',
- ],
- },
- {
- 'postbuild_name': 'Test variable in gyp file',
- 'action': [
- 'cp',
- '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
- '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}_gyp_touch',
- ],
- },
- {
- 'postbuild_name': 'Test paths relative to gyp file',
- 'action': [
- './copy.sh',
- 'subdirectory/copied_file.txt',
- '${BUILT_PRODUCTS_DIR}',
- ],
- },
- ],
- },
- {
- 'target_name': 'dyna_standalone',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Test variable in gyp file',
- 'action': [
- 'cp',
- '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
- '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}_gyp_touch.dylib',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-MyInt f() { return 0; }
+++ /dev/null
-MyInt f() { return 0; }
+++ /dev/null
-MyInt f() { return 0; }
+++ /dev/null
-MyInt f() { return 0; }
+++ /dev/null
-typedef int MyInt;
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'prefix_header_c',
- 'type': 'static_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'GCC_PREFIX_HEADER': 'header.h',
- },
- },
- {
- 'target_name': 'precompiled_prefix_header_c',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'GCC_PREFIX_HEADER': 'header.h',
- 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
- },
- },
-
- {
- 'target_name': 'prefix_header_cc',
- 'type': 'static_library',
- 'sources': [ 'file.cc', ],
- 'xcode_settings': {
- 'GCC_PREFIX_HEADER': 'header.h',
- },
- },
- {
- 'target_name': 'precompiled_prefix_header_cc',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.cc', ],
- 'xcode_settings': {
- 'GCC_PREFIX_HEADER': 'header.h',
- 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
- },
- },
-
- {
- 'target_name': 'prefix_header_m',
- 'type': 'static_library',
- 'sources': [ 'file.m', ],
- 'xcode_settings': {
- 'GCC_PREFIX_HEADER': 'header.h',
- },
- },
- {
- 'target_name': 'precompiled_prefix_header_m',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.m', ],
- 'xcode_settings': {
- 'GCC_PREFIX_HEADER': 'header.h',
- 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
- },
- },
-
- {
- 'target_name': 'prefix_header_mm',
- 'type': 'static_library',
- 'sources': [ 'file.mm', ],
- 'xcode_settings': {
- 'GCC_PREFIX_HEADER': 'header.h',
- },
- },
- {
- 'target_name': 'precompiled_prefix_header_mm',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.mm', ],
- 'xcode_settings': {
- 'GCC_PREFIX_HEADER': 'header.h',
- 'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
- },
- },
- ],
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.google.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-sleep 1 # mtime resolution is 1 sec on unix.
-touch "$1"
+++ /dev/null
-int main() {}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_app',
- 'product_name': 'Test App',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [
- 'main.c',
- ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'TestApp-Info.plist',
- },
- },
- {
- 'target_name': 'test_app_postbuilds',
- 'product_name': 'Test App 2',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [
- 'main.c',
- ],
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'TestApp-Info.plist',
- },
- 'postbuilds': [
- {
- 'postbuild_name': 'Postbuild that touches the app binary',
- 'action': [
- './delay-touch.sh', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
- ],
- },
- ],
- },
- {
- 'target_name': 'test_framework_postbuilds',
- 'product_name': 'Test Framework',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [
- 'empty.c',
- ],
- 'postbuilds': [
- {
- 'postbuild_name': 'Postbuild that touches the framework binary',
- 'action': [
- './delay-touch.sh', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-void f() {}
+++ /dev/null
-int main() {}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'default_rpath',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- },
- {
- 'target_name': 'explicit_rpath',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'],
- },
- },
- {
- 'target_name': 'explicit_rpaths_escaped',
- 'type': 'shared_library',
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- # Xcode requires spaces to be escaped, else it ends up adding two
- # independent rpaths.
- 'LD_RUNPATH_SEARCH_PATHS': ['First\\ rpath', 'Second\\ rpath'],
- },
- },
- {
- 'target_name': 'explicit_rpaths_bundle',
- 'product_name': 'My Framework',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c' ],
- 'xcode_settings': {
- 'LD_RUNPATH_SEARCH_PATHS': ['@loader_path/.'],
- },
- },
- {
- 'target_name': 'executable',
- 'type': 'executable',
- 'sources': [ 'main.c' ],
- 'xcode_settings': {
- 'LD_RUNPATH_SEARCH_PATHS': ['@executable_path/.'],
- },
- },
- ],
-}
+++ /dev/null
-#include <map>
-using std::map;
-
-int main() {
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'mytarget',
- 'type': 'executable',
- 'sources': [ 'file.cc', ],
- 'xcode_settings': {
- 'SDKROOT': 'macosx10.6',
- },
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_shorthand.sh', ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-test $SDKROOT = /Developer/SDKs/MacOSX10.6.sdk
+++ /dev/null
-int main() {}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'empty_bundle',
- 'type': 'loadable_module',
- 'mac_bundle': 1,
- },
- {
- 'target_name': 'resource_bundle',
- 'type': 'loadable_module',
- 'mac_bundle': 1,
- 'actions': [
- {
- 'action_name': 'Add Resource',
- 'inputs': [],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/app_manifest/foo.manifest',
- ],
- 'action': [
- 'touch', '<(INTERMEDIATE_DIR)/app_manifest/foo.manifest',
- ],
- 'process_outputs_as_mac_bundle_resources': 1,
- },
- ],
- },
- {
- 'target_name': 'dependent_on_resource_bundle',
- 'type': 'executable',
- 'sources': [ 'empty.c' ],
- 'dependencies': [
- 'resource_bundle',
- ],
- },
- ],
-}
-
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-static void the_static_function() {}
-
-void the_function() {
- the_static_function();
-}
+++ /dev/null
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This file would list symbols that should not be stripped.
+++ /dev/null
-void nested_f() {}
+++ /dev/null
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This file would list symbols that should not be stripped.
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'nested_strip_save',
- 'type': 'shared_library',
- 'sources': [ 'nested_file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
- 'CHROMIUM_STRIP_SAVE_FILE': 'nested_strip.saves',
- },
- },
- {
- 'target_name': 'nested_strip_save_postbuild',
- 'type': 'shared_library',
- 'sources': [ 'nested_file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
- 'CHROMIUM_STRIP_SAVE_FILE': 'nested_strip.saves',
- },
- 'postbuilds': [
- {
- 'postbuild_name': 'Action that reads CHROMIUM_STRIP_SAVE_FILE',
- 'action': [
- './test_reading_save_file_from_postbuild.sh',
- ],
- },
- ],
- },
- ],
-}
-
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-test -f ${CHROMIUM_STRIP_SAVE_FILE}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# These xcode_settings affect stripping:
-# "Deployment postprocessing involves stripping the binary, and setting
-# its file mode, owner, and group."
-#'DEPLOYMENT_POSTPROCESSING': 'YES',
-
-# "Specifies whether to strip symbol information from the binary.
-# Prerequisite: $DEPLOYMENT_POSTPROCESSING = YES" "Default Value: 'NO'"
-#'STRIP_INSTALLED_PRODUCT': 'YES',
-
-# "Values:
-# * all: Strips the binary completely, removing the symbol table and
-# relocation information
-# * non-global: Strips nonglobal symbols but saves external symbols.
-# * debugging: Strips debugging symbols but saves local and global
-# symbols."
-# (maps to no flag, -x, -S in that order)
-#'STRIP_STYLE': 'non-global',
-
-# "Additional strip flags"
-#'STRIPFLAGS': '-c',
-
-# "YES: Copied binaries are stripped of debugging symbols. This does
-# not cause the binary produced by the linker to be stripped. Use
-# 'STRIP_INSTALLED_PRODUCT (Strip Linked Product)' to have the linker
-# strip the binary."
-#'COPY_PHASE_STRIP': 'NO',
-{
- 'targets': [
- {
- 'target_name': 'no_postprocess',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'NO',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
- {
- 'target_name': 'no_strip',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'NO',
- },
- },
- {
- 'target_name': 'strip_all',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- 'STRIP_STYLE': 'all',
- },
- },
- {
- 'target_name': 'strip_nonglobal',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- 'STRIP_STYLE': 'non-global',
- },
- },
- {
- 'target_name': 'strip_debugging',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- 'STRIP_STYLE': 'debugging',
- },
- },
- {
- 'target_name': 'strip_all_custom_flags',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- 'STRIP_STYLE': 'all',
- 'STRIPFLAGS': '-c',
- },
- },
- {
- 'target_name': 'strip_all_bundle',
- 'type': 'shared_library',
- 'mac_bundle': '1',
- 'sources': [ 'file.c', ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- 'STRIP_STYLE': 'all',
- },
- },
- {
- 'target_name': 'strip_save',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'dependencies': [
- 'subdirectory/subdirectory.gyp:nested_strip_save',
- 'subdirectory/subdirectory.gyp:nested_strip_save_postbuild',
- ],
- 'xcode_settings': {
- 'DEPLOYMENT_POSTPROCESSING': 'YES',
- 'STRIP_INSTALLED_PRODUCT': 'YES',
- 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
- 'CHROMIUM_STRIP_SAVE_FILE': 'strip.saves',
- },
- },
- ],
-}
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-void f() {}
-int main() {}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'my_app',
- 'product_name': 'My App',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_bundle_executable.sh', ],
- },
- ],
- },
- {
- 'target_name': 'bundle_loadable_module',
- 'type': 'loadable_module',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_bundle_loadable_module.sh', ],
- },
- ],
- },
- {
- 'target_name': 'bundle_shared_library',
- 'type': 'shared_library',
- 'mac_bundle': 1,
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_bundle_shared_library.sh', ],
- },
- ],
- },
- # Types 'static_library' and 'none' can't exist as bundles.
-
- {
- 'target_name': 'nonbundle_executable',
- 'type': 'executable',
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_nonbundle_executable.sh', ],
- },
- ],
- },
- {
- 'target_name': 'nonbundle_loadable_module',
- 'type': 'loadable_module',
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_nonbundle_loadable_module.sh', ],
- },
- ],
- },
- {
- 'target_name': 'nonbundle_shared_library',
- 'type': 'shared_library',
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_nonbundle_shared_library.sh', ],
- },
- ],
- },
- {
- 'target_name': 'nonbundle_static_library',
- 'type': 'static_library',
- 'sources': [ 'file.c', ],
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_nonbundle_static_library.sh', ],
- },
- ],
- },
- {
- 'target_name': 'nonbundle_none',
- 'type': 'none',
- 'postbuilds': [
- {
- 'postbuild_name': 'envtest',
- 'action': [ './test_nonbundle_none.sh', ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-test $MACH_O_TYPE = mh_execute
-test $PRODUCT_TYPE = com.apple.product-type.application
-test "${PRODUCT_NAME}" = "My App"
-test "${FULL_PRODUCT_NAME}" = "My App.app"
-
-test "${EXECUTABLE_NAME}" = "My App"
-test "${EXECUTABLE_PATH}" = "My App.app/Contents/MacOS/My App"
-test "${WRAPPER_NAME}" = "My App.app"
-
-[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]]
-[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]]
-
-# Should be set, but empty.
-[[ ! $SDKROOT && ! ${SDKROOT-_} ]]
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-test $MACH_O_TYPE = mh_bundle
-test $PRODUCT_TYPE = com.apple.product-type.bundle
-test $PRODUCT_NAME = bundle_loadable_module
-test $FULL_PRODUCT_NAME = bundle_loadable_module.bundle
-
-test $EXECUTABLE_NAME = bundle_loadable_module
-test $EXECUTABLE_PATH = \
- "bundle_loadable_module.bundle/Contents/MacOS/bundle_loadable_module"
-test $WRAPPER_NAME = bundle_loadable_module.bundle
-
-[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]]
-[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]]
-
-# Should be set, but empty.
-[[ ! $SDKROOT && ! ${SDKROOT-_} ]]
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-test $MACH_O_TYPE = mh_dylib
-test $PRODUCT_TYPE = com.apple.product-type.framework
-test $PRODUCT_NAME = bundle_shared_library
-test $FULL_PRODUCT_NAME = bundle_shared_library.framework
-
-test $EXECUTABLE_NAME = bundle_shared_library
-test $EXECUTABLE_PATH = \
- "bundle_shared_library.framework/Versions/A/bundle_shared_library"
-test $WRAPPER_NAME = bundle_shared_library.framework
-
-test $DYLIB_INSTALL_NAME_BASE = "/Library/Frameworks"
-test $LD_DYLIB_INSTALL_NAME = \
- "/Library/Frameworks/bundle_shared_library.framework/Versions/A/bundle_shared_library"
-
-# Should be set, but empty.
-[[ ! $SDKROOT && ! ${SDKROOT-_} ]]
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-# For some reason, Xcode doesn't set MACH_O_TYPE for non-bundle executables.
-# Check for "not set", not just "empty":
-[[ ! $MACH_O_TYPE && ${MACH_O_TYPE-_} ]]
-test $PRODUCT_TYPE = com.apple.product-type.tool
-test $PRODUCT_NAME = nonbundle_executable
-test $FULL_PRODUCT_NAME = nonbundle_executable
-
-test $EXECUTABLE_NAME = nonbundle_executable
-test $EXECUTABLE_PATH = nonbundle_executable
-[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]]
-
-[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]]
-[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]]
-
-# Should be set, but empty.
-[[ ! $SDKROOT && ! ${SDKROOT-_} ]]
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-test $MACH_O_TYPE = mh_bundle
-test $PRODUCT_TYPE = com.apple.product-type.library.dynamic
-test $PRODUCT_NAME = nonbundle_loadable_module
-test $FULL_PRODUCT_NAME = nonbundle_loadable_module.so
-
-test $EXECUTABLE_NAME = nonbundle_loadable_module.so
-test $EXECUTABLE_PATH = nonbundle_loadable_module.so
-[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]]
-
-test $DYLIB_INSTALL_NAME_BASE = "/usr/local/lib"
-test $LD_DYLIB_INSTALL_NAME = "/usr/local/lib/nonbundle_loadable_module.so"
-
-# Should be set, but empty.
-[[ ! $SDKROOT && ! ${SDKROOT-_} ]]
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-# Check for "not set", not just "empty":
-[[ ! $MACH_O_TYPE && ${MACH_O_TYPE-_} ]]
-[[ ! $PRODUCT_TYPE && ${PRODUCT_TYPE-_} ]]
-test $PRODUCT_NAME = nonbundle_none
-[[ ! $FULL_PRODUCT_NAME && ${FULL_PRODUCT_NAME-_} ]]
-
-[[ ! $EXECUTABLE_NAME && ${EXECUTABLE_NAME-_} ]]
-[[ ! $EXECUTABLE_PATH && ${EXECUTABLE_PATH-_} ]]
-[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]]
-
-[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]]
-[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]]
-
-# Should be set, but empty.
-[[ ! $SDKROOT && ! ${SDKROOT-_} ]]
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-test $MACH_O_TYPE = mh_dylib
-test $PRODUCT_TYPE = com.apple.product-type.library.dynamic
-test $PRODUCT_NAME = nonbundle_shared_library
-test $FULL_PRODUCT_NAME = libnonbundle_shared_library.dylib
-
-test $EXECUTABLE_NAME = libnonbundle_shared_library.dylib
-test $EXECUTABLE_PATH = libnonbundle_shared_library.dylib
-[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]]
-
-test $DYLIB_INSTALL_NAME_BASE = "/usr/local/lib"
-test $LD_DYLIB_INSTALL_NAME = "/usr/local/lib/libnonbundle_shared_library.dylib"
-
-# Should be set, but empty.
-[[ ! $SDKROOT && ! ${SDKROOT-_} ]]
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-test $MACH_O_TYPE = staticlib
-test $PRODUCT_TYPE = com.apple.product-type.library.static
-test $PRODUCT_NAME = nonbundle_static_library
-test $FULL_PRODUCT_NAME = libnonbundle_static_library.a
-
-test $EXECUTABLE_NAME = libnonbundle_static_library.a
-test $EXECUTABLE_PATH = libnonbundle_static_library.a
-[[ ! $WRAPPER_NAME && ${WRAPPER_NAME-_} ]]
-
-[[ ! $DYLIB_INSTALL_NAME_BASE && ${DYLIB_INSTALL_NAME_BASE-_} ]]
-[[ ! $LD_DYLIB_INSTALL_NAME && ${LD_DYLIB_INSTALL_NAME-_} ]]
-
-# Should be set, but empty.
-[[ ! $SDKROOT && ! ${SDKROOT-_} ]]
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.google.${PRODUCT_NAME}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-
- <key>BraceProcessedKey1</key>
- <string>${BRACE_DEPENDENT_KEY1}</string>
- <key>BraceProcessedKey2</key>
- <string>${BRACE_DEPENDENT_KEY2}</string>
- <key>BraceProcessedKey3</key>
- <string>${BRACE_DEPENDENT_KEY3}</string>
-
- <key>ParenProcessedKey1</key>
- <string>${PAREN_DEPENDENT_KEY1}</string>
- <key>ParenProcessedKey2</key>
- <string>${PAREN_DEPENDENT_KEY2}</string>
- <key>ParenProcessedKey3</key>
- <string>${PAREN_DEPENDENT_KEY3}</string>
-
- <key>BareProcessedKey1</key>
- <string>${BARE_DEPENDENT_KEY1}</string>
- <key>BareProcessedKey2</key>
- <string>${BARE_DEPENDENT_KEY2}</string>
- <key>BareProcessedKey3</key>
- <string>${BARE_DEPENDENT_KEY3}</string>
-
- <key>MixedProcessedKey</key>
- <string>${MIXED_DEPENDENT_KEY}</string>
-</dict>
-</plist>
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'test_app',
- 'product_name': 'Test',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'sources': [
- 'main.c',
- 'file.ext1',
- 'file.ext2',
- 'file.ext3',
- ],
- # Env vars in copies.
- 'copies': [
- {
- 'destination': '<(PRODUCT_DIR)/${PRODUCT_NAME}-copy-brace',
- 'files': [ 'main.c', ], # ${SOURCE_ROOT} doesn't work with xcode
- },
- {
- 'destination': '<(PRODUCT_DIR)/$(PRODUCT_NAME)-copy-paren',
- 'files': [ '$(SOURCE_ROOT)/main.c', ],
- },
- {
- 'destination': '<(PRODUCT_DIR)/$PRODUCT_NAME-copy-bare',
- 'files': [ 'main.c', ], # $SOURCE_ROOT doesn't work with xcode
- },
- ],
- # Env vars in actions. The $FOO's are here to test that env vars that
- # aren't defined are handled in some way that doesn't break the build.
- 'actions': [
- {
- 'action_name': 'Action copy braces ${PRODUCT_NAME} ${FOO}',
- 'description': 'Action copy braces ${PRODUCT_NAME} ${FOO}',
- 'inputs': [ '${SOURCE_ROOT}/main.c' ],
- # Referencing ${PRODUCT_NAME} in action outputs doesn't work with
- # the Xcode generator (PRODUCT_NAME expands to "Test Support").
- 'outputs': [ '<(PRODUCT_DIR)/action-copy-brace.txt' ],
- 'action': [ 'cp', '${SOURCE_ROOT}/main.c',
- '<(PRODUCT_DIR)/action-copy-brace.txt' ],
- },
- {
- 'action_name': 'Action copy parens $(PRODUCT_NAME) $(FOO)',
- 'description': 'Action copy parens $(PRODUCT_NAME) $(FOO)',
- 'inputs': [ '$(SOURCE_ROOT)/main.c' ],
- # Referencing $(PRODUCT_NAME) in action outputs doesn't work with
- # the Xcode generator (PRODUCT_NAME expands to "Test Support").
- 'outputs': [ '<(PRODUCT_DIR)/action-copy-paren.txt' ],
- 'action': [ 'cp', '$(SOURCE_ROOT)/main.c',
- '<(PRODUCT_DIR)/action-copy-paren.txt' ],
- },
- {
- 'action_name': 'Action copy bare $PRODUCT_NAME $FOO',
- 'description': 'Action copy bare $PRODUCT_NAME $FOO',
- 'inputs': [ '$SOURCE_ROOT/main.c' ],
- # Referencing $PRODUCT_NAME in action outputs doesn't work with
- # the Xcode generator (PRODUCT_NAME expands to "Test Support").
- 'outputs': [ '<(PRODUCT_DIR)/action-copy-bare.txt' ],
- 'action': [ 'cp', '$SOURCE_ROOT/main.c',
- '<(PRODUCT_DIR)/action-copy-bare.txt' ],
- },
- ],
- # Env vars in xcode_settings.
- 'xcode_settings': {
- 'INFOPLIST_FILE': 'Info.plist',
- 'STRING_KEY': '/Source/Project',
-
- 'BRACE_DEPENDENT_KEY2': '${STRING_KEY}/${PRODUCT_NAME}',
- 'BRACE_DEPENDENT_KEY1': 'D:${BRACE_DEPENDENT_KEY2}',
- 'BRACE_DEPENDENT_KEY3': '${PRODUCT_TYPE}:${BRACE_DEPENDENT_KEY1}',
-
- 'PAREN_DEPENDENT_KEY2': '$(STRING_KEY)/$(PRODUCT_NAME)',
- 'PAREN_DEPENDENT_KEY1': 'D:$(PAREN_DEPENDENT_KEY2)',
- 'PAREN_DEPENDENT_KEY3': '$(PRODUCT_TYPE):$(PAREN_DEPENDENT_KEY1)',
-
- 'BARE_DEPENDENT_KEY2': '$STRING_KEY/$PRODUCT_NAME',
- 'BARE_DEPENDENT_KEY1': 'D:$BARE_DEPENDENT_KEY2',
- 'BARE_DEPENDENT_KEY3': '$PRODUCT_TYPE:$BARE_DEPENDENT_KEY1',
-
- 'MIXED_DEPENDENT_KEY': '${STRING_KEY}:$(PRODUCT_NAME):$MACH_O_TYPE',
- },
- # Env vars in rules. The $FOO's are here to test that env vars that
- # aren't defined are handled in some way that doesn't break the build.
- 'rules': [
- {
- 'rule_name': 'brace_rule',
- 'message': 'Rule braces ${PRODUCT_NAME} ${FOO} <(RULE_INPUT_NAME)',
- 'extension': 'ext1',
- 'inputs': [ '${SOURCE_ROOT}/main.c' ],
- 'outputs': [ '<(PRODUCT_DIR)/rule-copy-brace.txt' ],
- 'action': [ 'cp', '${SOURCE_ROOT}/main.c',
- '<(PRODUCT_DIR)/rule-copy-brace.txt' ],
- },
- {
- 'rule_name': 'paren_rule',
- 'message': 'Rule parens $(PRODUCT_NAME) $(FOO) <(RULE_INPUT_NAME)',
- 'extension': 'ext2',
- 'inputs': [ '$(SOURCE_ROOT)/main.c' ],
- 'outputs': [ '<(PRODUCT_DIR)/rule-copy-paren.txt' ],
- 'action': [ 'cp', '$(SOURCE_ROOT)/main.c',
- '<(PRODUCT_DIR)/rule-copy-paren.txt' ],
- },
- # TODO: Fails in xcode. Looks like a bug in the xcode generator though
- # (which uses makefiles for rules, and thinks $PRODUCT_NAME is
- # $(P)RODUCT_NAME).
- #{
- # 'rule_name': 'bare_rule',
- # 'message': 'Rule copy bare $PRODUCT_NAME $FOO',
- # 'extension': 'ext3',
- # 'inputs': [ '$SOURCE_ROOT/main.c' ],
- # 'outputs': [ '<(PRODUCT_DIR)/rule-copy-bare.txt' ],
- # 'action': [ 'cp', '$SOURCE_ROOT/main.c',
- # '<(PRODUCT_DIR)/rule-copy-bare.txt' ],
- #},
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'target_defaults': {
- 'xcode_settings': {
- 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
- },
- },
-
- 'variables': {
- # Non-failing tests should check that these trivial files in every language
- # still compile correctly.
- 'valid_sources': [
- 'valid_c.c',
- 'valid_cc.cc',
- 'valid_m.m',
- 'valid_mm.mm',
- ],
- },
-
- # Targets come in pairs: 'foo' and 'foo-fail', with the former building with
- # no warnings and the latter not.
- 'targets': [
- # GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO (default: YES):
- {
- 'target_name': 'warn_about_invalid_offsetof_macro',
- 'type': 'executable',
- 'sources': [
- 'warn_about_invalid_offsetof_macro.cc',
- '<@(valid_sources)',
- ],
- 'xcode_settings': {
- 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'NO',
- },
- },
- {
- 'target_name': 'warn_about_invalid_offsetof_macro-fail',
- 'type': 'executable',
- 'sources': [ 'warn_about_invalid_offsetof_macro.cc', ],
- },
- # GCC_WARN_ABOUT_MISSING_NEWLINE (default: NO):
- {
- 'target_name': 'warn_about_missing_newline',
- 'type': 'executable',
- 'sources': [
- 'warn_about_missing_newline.c',
- '<@(valid_sources)',
- ],
- },
- {
- 'target_name': 'warn_about_missing_newline-fail',
- 'type': 'executable',
- 'sources': [ 'warn_about_missing_newline.c', ],
- 'xcode_settings': {
- 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
- },
- },
- ],
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file exists to test that valid C files compile correctly.
-
-void FunctionInCFile(void) {
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file exists to test that valid C++ files compile correctly.
-
-void FunctionInCCFile() {
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file exists to test that valid Objective-C files compile correctly.
-
-void FunctionInMFile(void) {
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file exists to test that valid Objective-C++ files compile correctly.
-
-void FunctionInMMFile() {
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#define offsetof(st, m) ((unsigned)((char*)&((st*)0)->m - (char*)0))
-
-struct MyStruct {
- virtual void MyFunc() = 0;
- int my_member;
-};
-
-int main() {
- unsigned x = offsetof(MyStruct, my_member);
- return x ? 0 : 1;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Important: Don't terminate this file with a newline.
-int main() {
- return 0;
-}
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'main',
- 'type': 'executable',
- 'sources': [
- 'main.cc',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that .d files and all.deps are properly generated.
-"""
-
-import TestGyp
-
-# .d files are only used by the make build.
-test = TestGyp.TestGyp(formats=['make'])
-
-test.run_gyp('dependencies.gyp')
-
-test.build('dependencies.gyp', test.ALL)
-
-deps_file = test.built_file_path(".deps/out/Default/obj.target/main/main.o.d")
-test.must_contain(deps_file, "main.h")
-
-# Build a second time to make sure we generate all.deps.
-test.build('dependencies.gyp', test.ALL)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Tests the use of the NO_LOAD flag which makes loading sub .mk files
-optional.
-"""
-
-# Python 2.5 needs this for the with statement.
-from __future__ import with_statement
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['make'])
-
-test.run_gyp('all.gyp', chdir='noload')
-
-test.relocate('noload', 'relocate/noload')
-
-test.build('build/all.gyp', test.ALL, chdir='relocate/noload')
-test.run_built_executable('exe', chdir='relocate/noload',
- stdout='Hello from shared.c.\n')
-
-# Just sanity test that NO_LOAD=lib doesn't break anything.
-test.build('build/all.gyp', test.ALL, chdir='relocate/noload',
- arguments=['NO_LOAD=lib'])
-test.run_built_executable('exe', chdir='relocate/noload',
- stdout='Hello from shared.c.\n')
-test.build('build/all.gyp', test.ALL, chdir='relocate/noload',
- arguments=['NO_LOAD=z'])
-test.run_built_executable('exe', chdir='relocate/noload',
- stdout='Hello from shared.c.\n')
-
-# Make sure we can rebuild without reloading the sub .mk file.
-with open('relocate/noload/main.c', 'a') as src_file:
- src_file.write("\n")
-test.build('build/all.gyp', test.ALL, chdir='relocate/noload',
- arguments=['NO_LOAD=lib'])
-test.run_built_executable('exe', chdir='relocate/noload',
- stdout='Hello from shared.c.\n')
-
-# Change shared.c, but verify that it doesn't get rebuild if we don't load it.
-with open('relocate/noload/lib/shared.c', 'w') as shared_file:
- shared_file.write(
- '#include "shared.h"\n'
- 'const char kSharedStr[] = "modified";\n'
- )
-test.build('build/all.gyp', test.ALL, chdir='relocate/noload',
- arguments=['NO_LOAD=lib'])
-test.run_built_executable('exe', chdir='relocate/noload',
- stdout='Hello from shared.c.\n')
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-#include "main.h"
-
-int main(int argc, char *argv[]) {
- printf("hello world\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'exe',
- 'type': 'executable',
- 'sources': [
- 'main.c',
- ],
- 'dependencies': [
- 'lib/shared.gyp:shared',
- ],
- },
- ],
-}
+++ /dev/null
-#include "shared.h"
-
-const char kSharedStr[] = "shared.c";
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'shared',
- 'type': 'shared_library',
- 'sources': [
- 'shared.c',
- 'shared.h',
- ],
- },
- ],
-}
+++ /dev/null
-extern const char kSharedStr[];
+++ /dev/null
-#include <stdio.h>
-
-#include "lib/shared.h"
-
-int main(int argc, char *argv[])
-{
- printf("Hello from %s.\n", kSharedStr);
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure lots of actions in the same target don't cause exceeding command
-line length.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('many-actions-unsorted.gyp')
-test.build('many-actions-unsorted.gyp', test.ALL)
-for i in range(15):
- test.built_file_must_exist('generated_%d.h' % i)
-
-# Make sure the optimized cygwin setup doesn't cause problems for incremental
-# builds.
-test.touch('file1')
-test.build('many-actions-unsorted.gyp', test.ALL)
-
-test.touch('file0')
-test.build('many-actions-unsorted.gyp', test.ALL)
-
-test.touch('file2')
-test.touch('file3')
-test.touch('file4')
-test.build('many-actions-unsorted.gyp', test.ALL)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure lots of actions in the same target don't cause exceeding command
-line length.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('many-actions.gyp')
-test.build('many-actions.gyp', test.ALL)
-for i in range(200):
- test.built_file_must_exist('generated_%d.h' % i)
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'msvs_cygwin_dirs': ['../../../../<(DEPTH)/third_party/cygwin'],
- },
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'none',
- 'actions': [
- # Notice that the inputs go 0, 1, ..., 0, 1, .... This is to test
- # a regression in the msvs generator in _AddActions.
- {
- 'action_name': 'do_0',
- 'inputs': ['file0'],
- 'outputs': ['<(PRODUCT_DIR)/generated_0.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_0.h',
- ],
- },
- {
- 'action_name': 'do_1',
- 'inputs': ['file1'],
- 'outputs': ['<(PRODUCT_DIR)/generated_1.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_1.h',
- ],
- },
- {
- 'action_name': 'do_2',
- 'inputs': ['file2'],
- 'outputs': ['<(PRODUCT_DIR)/generated_2.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_2.h',
- ],
- },
- {
- 'action_name': 'do_3',
- 'inputs': ['file3'],
- 'outputs': ['<(PRODUCT_DIR)/generated_3.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_3.h',
- ],
- },
- {
- 'action_name': 'do_4',
- 'inputs': ['file4'],
- 'outputs': ['<(PRODUCT_DIR)/generated_4.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_4.h',
- ],
- },
- {
- 'action_name': 'do_5',
- 'inputs': ['file0'],
- 'outputs': ['<(PRODUCT_DIR)/generated_5.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_5.h',
- ],
- },
- {
- 'action_name': 'do_6',
- 'inputs': ['file1'],
- 'outputs': ['<(PRODUCT_DIR)/generated_6.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_6.h',
- ],
- },
- {
- 'action_name': 'do_7',
- 'inputs': ['file2'],
- 'outputs': ['<(PRODUCT_DIR)/generated_7.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_7.h',
- ],
- },
- {
- 'action_name': 'do_8',
- 'inputs': ['file3'],
- 'outputs': ['<(PRODUCT_DIR)/generated_8.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_8.h',
- ],
- },
- {
- 'action_name': 'do_9',
- 'inputs': ['file4'],
- 'outputs': ['<(PRODUCT_DIR)/generated_9.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_9.h',
- ],
- },
- {
- 'action_name': 'do_10',
- 'inputs': ['file0'],
- 'outputs': ['<(PRODUCT_DIR)/generated_10.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_10.h',
- ],
- },
- {
- 'action_name': 'do_11',
- 'inputs': ['file1'],
- 'outputs': ['<(PRODUCT_DIR)/generated_11.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_11.h',
- ],
- },
- {
- 'action_name': 'do_12',
- 'inputs': ['file2'],
- 'outputs': ['<(PRODUCT_DIR)/generated_12.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_12.h',
- ],
- },
- {
- 'action_name': 'do_13',
- 'inputs': ['file3'],
- 'outputs': ['<(PRODUCT_DIR)/generated_13.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_13.h',
- ],
- },
- {
- 'action_name': 'do_14',
- 'inputs': ['file4'],
- 'outputs': ['<(PRODUCT_DIR)/generated_14.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_14.h',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'msvs_cygwin_dirs': ['../../../../<(DEPTH)/third_party/cygwin'],
- },
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'do_0',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_0.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_0.h',
- ],
- },
- {
- 'action_name': 'do_1',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_1.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_1.h',
- ],
- },
- {
- 'action_name': 'do_2',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_2.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_2.h',
- ],
- },
- {
- 'action_name': 'do_3',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_3.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_3.h',
- ],
- },
- {
- 'action_name': 'do_4',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_4.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_4.h',
- ],
- },
- {
- 'action_name': 'do_5',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_5.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_5.h',
- ],
- },
- {
- 'action_name': 'do_6',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_6.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_6.h',
- ],
- },
- {
- 'action_name': 'do_7',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_7.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_7.h',
- ],
- },
- {
- 'action_name': 'do_8',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_8.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_8.h',
- ],
- },
- {
- 'action_name': 'do_9',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_9.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_9.h',
- ],
- },
- {
- 'action_name': 'do_10',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_10.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_10.h',
- ],
- },
- {
- 'action_name': 'do_11',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_11.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_11.h',
- ],
- },
- {
- 'action_name': 'do_12',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_12.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_12.h',
- ],
- },
- {
- 'action_name': 'do_13',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_13.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_13.h',
- ],
- },
- {
- 'action_name': 'do_14',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_14.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_14.h',
- ],
- },
- {
- 'action_name': 'do_15',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_15.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_15.h',
- ],
- },
- {
- 'action_name': 'do_16',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_16.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_16.h',
- ],
- },
- {
- 'action_name': 'do_17',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_17.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_17.h',
- ],
- },
- {
- 'action_name': 'do_18',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_18.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_18.h',
- ],
- },
- {
- 'action_name': 'do_19',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_19.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_19.h',
- ],
- },
- {
- 'action_name': 'do_20',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_20.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_20.h',
- ],
- },
- {
- 'action_name': 'do_21',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_21.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_21.h',
- ],
- },
- {
- 'action_name': 'do_22',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_22.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_22.h',
- ],
- },
- {
- 'action_name': 'do_23',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_23.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_23.h',
- ],
- },
- {
- 'action_name': 'do_24',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_24.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_24.h',
- ],
- },
- {
- 'action_name': 'do_25',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_25.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_25.h',
- ],
- },
- {
- 'action_name': 'do_26',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_26.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_26.h',
- ],
- },
- {
- 'action_name': 'do_27',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_27.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_27.h',
- ],
- },
- {
- 'action_name': 'do_28',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_28.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_28.h',
- ],
- },
- {
- 'action_name': 'do_29',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_29.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_29.h',
- ],
- },
- {
- 'action_name': 'do_30',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_30.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_30.h',
- ],
- },
- {
- 'action_name': 'do_31',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_31.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_31.h',
- ],
- },
- {
- 'action_name': 'do_32',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_32.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_32.h',
- ],
- },
- {
- 'action_name': 'do_33',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_33.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_33.h',
- ],
- },
- {
- 'action_name': 'do_34',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_34.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_34.h',
- ],
- },
- {
- 'action_name': 'do_35',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_35.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_35.h',
- ],
- },
- {
- 'action_name': 'do_36',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_36.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_36.h',
- ],
- },
- {
- 'action_name': 'do_37',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_37.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_37.h',
- ],
- },
- {
- 'action_name': 'do_38',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_38.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_38.h',
- ],
- },
- {
- 'action_name': 'do_39',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_39.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_39.h',
- ],
- },
- {
- 'action_name': 'do_40',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_40.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_40.h',
- ],
- },
- {
- 'action_name': 'do_41',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_41.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_41.h',
- ],
- },
- {
- 'action_name': 'do_42',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_42.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_42.h',
- ],
- },
- {
- 'action_name': 'do_43',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_43.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_43.h',
- ],
- },
- {
- 'action_name': 'do_44',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_44.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_44.h',
- ],
- },
- {
- 'action_name': 'do_45',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_45.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_45.h',
- ],
- },
- {
- 'action_name': 'do_46',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_46.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_46.h',
- ],
- },
- {
- 'action_name': 'do_47',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_47.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_47.h',
- ],
- },
- {
- 'action_name': 'do_48',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_48.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_48.h',
- ],
- },
- {
- 'action_name': 'do_49',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_49.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_49.h',
- ],
- },
- {
- 'action_name': 'do_50',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_50.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_50.h',
- ],
- },
- {
- 'action_name': 'do_51',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_51.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_51.h',
- ],
- },
- {
- 'action_name': 'do_52',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_52.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_52.h',
- ],
- },
- {
- 'action_name': 'do_53',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_53.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_53.h',
- ],
- },
- {
- 'action_name': 'do_54',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_54.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_54.h',
- ],
- },
- {
- 'action_name': 'do_55',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_55.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_55.h',
- ],
- },
- {
- 'action_name': 'do_56',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_56.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_56.h',
- ],
- },
- {
- 'action_name': 'do_57',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_57.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_57.h',
- ],
- },
- {
- 'action_name': 'do_58',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_58.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_58.h',
- ],
- },
- {
- 'action_name': 'do_59',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_59.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_59.h',
- ],
- },
- {
- 'action_name': 'do_60',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_60.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_60.h',
- ],
- },
- {
- 'action_name': 'do_61',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_61.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_61.h',
- ],
- },
- {
- 'action_name': 'do_62',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_62.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_62.h',
- ],
- },
- {
- 'action_name': 'do_63',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_63.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_63.h',
- ],
- },
- {
- 'action_name': 'do_64',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_64.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_64.h',
- ],
- },
- {
- 'action_name': 'do_65',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_65.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_65.h',
- ],
- },
- {
- 'action_name': 'do_66',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_66.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_66.h',
- ],
- },
- {
- 'action_name': 'do_67',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_67.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_67.h',
- ],
- },
- {
- 'action_name': 'do_68',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_68.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_68.h',
- ],
- },
- {
- 'action_name': 'do_69',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_69.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_69.h',
- ],
- },
- {
- 'action_name': 'do_70',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_70.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_70.h',
- ],
- },
- {
- 'action_name': 'do_71',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_71.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_71.h',
- ],
- },
- {
- 'action_name': 'do_72',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_72.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_72.h',
- ],
- },
- {
- 'action_name': 'do_73',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_73.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_73.h',
- ],
- },
- {
- 'action_name': 'do_74',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_74.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_74.h',
- ],
- },
- {
- 'action_name': 'do_75',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_75.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_75.h',
- ],
- },
- {
- 'action_name': 'do_76',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_76.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_76.h',
- ],
- },
- {
- 'action_name': 'do_77',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_77.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_77.h',
- ],
- },
- {
- 'action_name': 'do_78',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_78.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_78.h',
- ],
- },
- {
- 'action_name': 'do_79',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_79.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_79.h',
- ],
- },
- {
- 'action_name': 'do_80',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_80.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_80.h',
- ],
- },
- {
- 'action_name': 'do_81',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_81.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_81.h',
- ],
- },
- {
- 'action_name': 'do_82',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_82.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_82.h',
- ],
- },
- {
- 'action_name': 'do_83',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_83.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_83.h',
- ],
- },
- {
- 'action_name': 'do_84',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_84.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_84.h',
- ],
- },
- {
- 'action_name': 'do_85',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_85.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_85.h',
- ],
- },
- {
- 'action_name': 'do_86',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_86.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_86.h',
- ],
- },
- {
- 'action_name': 'do_87',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_87.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_87.h',
- ],
- },
- {
- 'action_name': 'do_88',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_88.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_88.h',
- ],
- },
- {
- 'action_name': 'do_89',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_89.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_89.h',
- ],
- },
- {
- 'action_name': 'do_90',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_90.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_90.h',
- ],
- },
- {
- 'action_name': 'do_91',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_91.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_91.h',
- ],
- },
- {
- 'action_name': 'do_92',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_92.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_92.h',
- ],
- },
- {
- 'action_name': 'do_93',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_93.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_93.h',
- ],
- },
- {
- 'action_name': 'do_94',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_94.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_94.h',
- ],
- },
- {
- 'action_name': 'do_95',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_95.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_95.h',
- ],
- },
- {
- 'action_name': 'do_96',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_96.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_96.h',
- ],
- },
- {
- 'action_name': 'do_97',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_97.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_97.h',
- ],
- },
- {
- 'action_name': 'do_98',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_98.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_98.h',
- ],
- },
- {
- 'action_name': 'do_99',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_99.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_99.h',
- ],
- },
- {
- 'action_name': 'do_100',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_100.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_100.h',
- ],
- },
- {
- 'action_name': 'do_101',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_101.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_101.h',
- ],
- },
- {
- 'action_name': 'do_102',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_102.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_102.h',
- ],
- },
- {
- 'action_name': 'do_103',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_103.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_103.h',
- ],
- },
- {
- 'action_name': 'do_104',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_104.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_104.h',
- ],
- },
- {
- 'action_name': 'do_105',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_105.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_105.h',
- ],
- },
- {
- 'action_name': 'do_106',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_106.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_106.h',
- ],
- },
- {
- 'action_name': 'do_107',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_107.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_107.h',
- ],
- },
- {
- 'action_name': 'do_108',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_108.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_108.h',
- ],
- },
- {
- 'action_name': 'do_109',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_109.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_109.h',
- ],
- },
- {
- 'action_name': 'do_110',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_110.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_110.h',
- ],
- },
- {
- 'action_name': 'do_111',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_111.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_111.h',
- ],
- },
- {
- 'action_name': 'do_112',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_112.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_112.h',
- ],
- },
- {
- 'action_name': 'do_113',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_113.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_113.h',
- ],
- },
- {
- 'action_name': 'do_114',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_114.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_114.h',
- ],
- },
- {
- 'action_name': 'do_115',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_115.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_115.h',
- ],
- },
- {
- 'action_name': 'do_116',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_116.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_116.h',
- ],
- },
- {
- 'action_name': 'do_117',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_117.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_117.h',
- ],
- },
- {
- 'action_name': 'do_118',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_118.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_118.h',
- ],
- },
- {
- 'action_name': 'do_119',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_119.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_119.h',
- ],
- },
- {
- 'action_name': 'do_120',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_120.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_120.h',
- ],
- },
- {
- 'action_name': 'do_121',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_121.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_121.h',
- ],
- },
- {
- 'action_name': 'do_122',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_122.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_122.h',
- ],
- },
- {
- 'action_name': 'do_123',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_123.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_123.h',
- ],
- },
- {
- 'action_name': 'do_124',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_124.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_124.h',
- ],
- },
- {
- 'action_name': 'do_125',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_125.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_125.h',
- ],
- },
- {
- 'action_name': 'do_126',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_126.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_126.h',
- ],
- },
- {
- 'action_name': 'do_127',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_127.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_127.h',
- ],
- },
- {
- 'action_name': 'do_128',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_128.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_128.h',
- ],
- },
- {
- 'action_name': 'do_129',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_129.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_129.h',
- ],
- },
- {
- 'action_name': 'do_130',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_130.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_130.h',
- ],
- },
- {
- 'action_name': 'do_131',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_131.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_131.h',
- ],
- },
- {
- 'action_name': 'do_132',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_132.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_132.h',
- ],
- },
- {
- 'action_name': 'do_133',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_133.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_133.h',
- ],
- },
- {
- 'action_name': 'do_134',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_134.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_134.h',
- ],
- },
- {
- 'action_name': 'do_135',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_135.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_135.h',
- ],
- },
- {
- 'action_name': 'do_136',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_136.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_136.h',
- ],
- },
- {
- 'action_name': 'do_137',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_137.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_137.h',
- ],
- },
- {
- 'action_name': 'do_138',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_138.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_138.h',
- ],
- },
- {
- 'action_name': 'do_139',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_139.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_139.h',
- ],
- },
- {
- 'action_name': 'do_140',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_140.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_140.h',
- ],
- },
- {
- 'action_name': 'do_141',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_141.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_141.h',
- ],
- },
- {
- 'action_name': 'do_142',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_142.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_142.h',
- ],
- },
- {
- 'action_name': 'do_143',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_143.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_143.h',
- ],
- },
- {
- 'action_name': 'do_144',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_144.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_144.h',
- ],
- },
- {
- 'action_name': 'do_145',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_145.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_145.h',
- ],
- },
- {
- 'action_name': 'do_146',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_146.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_146.h',
- ],
- },
- {
- 'action_name': 'do_147',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_147.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_147.h',
- ],
- },
- {
- 'action_name': 'do_148',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_148.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_148.h',
- ],
- },
- {
- 'action_name': 'do_149',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_149.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_149.h',
- ],
- },
- {
- 'action_name': 'do_150',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_150.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_150.h',
- ],
- },
- {
- 'action_name': 'do_151',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_151.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_151.h',
- ],
- },
- {
- 'action_name': 'do_152',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_152.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_152.h',
- ],
- },
- {
- 'action_name': 'do_153',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_153.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_153.h',
- ],
- },
- {
- 'action_name': 'do_154',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_154.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_154.h',
- ],
- },
- {
- 'action_name': 'do_155',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_155.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_155.h',
- ],
- },
- {
- 'action_name': 'do_156',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_156.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_156.h',
- ],
- },
- {
- 'action_name': 'do_157',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_157.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_157.h',
- ],
- },
- {
- 'action_name': 'do_158',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_158.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_158.h',
- ],
- },
- {
- 'action_name': 'do_159',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_159.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_159.h',
- ],
- },
- {
- 'action_name': 'do_160',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_160.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_160.h',
- ],
- },
- {
- 'action_name': 'do_161',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_161.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_161.h',
- ],
- },
- {
- 'action_name': 'do_162',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_162.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_162.h',
- ],
- },
- {
- 'action_name': 'do_163',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_163.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_163.h',
- ],
- },
- {
- 'action_name': 'do_164',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_164.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_164.h',
- ],
- },
- {
- 'action_name': 'do_165',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_165.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_165.h',
- ],
- },
- {
- 'action_name': 'do_166',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_166.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_166.h',
- ],
- },
- {
- 'action_name': 'do_167',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_167.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_167.h',
- ],
- },
- {
- 'action_name': 'do_168',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_168.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_168.h',
- ],
- },
- {
- 'action_name': 'do_169',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_169.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_169.h',
- ],
- },
- {
- 'action_name': 'do_170',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_170.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_170.h',
- ],
- },
- {
- 'action_name': 'do_171',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_171.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_171.h',
- ],
- },
- {
- 'action_name': 'do_172',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_172.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_172.h',
- ],
- },
- {
- 'action_name': 'do_173',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_173.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_173.h',
- ],
- },
- {
- 'action_name': 'do_174',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_174.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_174.h',
- ],
- },
- {
- 'action_name': 'do_175',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_175.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_175.h',
- ],
- },
- {
- 'action_name': 'do_176',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_176.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_176.h',
- ],
- },
- {
- 'action_name': 'do_177',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_177.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_177.h',
- ],
- },
- {
- 'action_name': 'do_178',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_178.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_178.h',
- ],
- },
- {
- 'action_name': 'do_179',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_179.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_179.h',
- ],
- },
- {
- 'action_name': 'do_180',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_180.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_180.h',
- ],
- },
- {
- 'action_name': 'do_181',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_181.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_181.h',
- ],
- },
- {
- 'action_name': 'do_182',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_182.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_182.h',
- ],
- },
- {
- 'action_name': 'do_183',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_183.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_183.h',
- ],
- },
- {
- 'action_name': 'do_184',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_184.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_184.h',
- ],
- },
- {
- 'action_name': 'do_185',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_185.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_185.h',
- ],
- },
- {
- 'action_name': 'do_186',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_186.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_186.h',
- ],
- },
- {
- 'action_name': 'do_187',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_187.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_187.h',
- ],
- },
- {
- 'action_name': 'do_188',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_188.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_188.h',
- ],
- },
- {
- 'action_name': 'do_189',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_189.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_189.h',
- ],
- },
- {
- 'action_name': 'do_190',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_190.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_190.h',
- ],
- },
- {
- 'action_name': 'do_191',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_191.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_191.h',
- ],
- },
- {
- 'action_name': 'do_192',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_192.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_192.h',
- ],
- },
- {
- 'action_name': 'do_193',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_193.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_193.h',
- ],
- },
- {
- 'action_name': 'do_194',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_194.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_194.h',
- ],
- },
- {
- 'action_name': 'do_195',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_195.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_195.h',
- ],
- },
- {
- 'action_name': 'do_196',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_196.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_196.h',
- ],
- },
- {
- 'action_name': 'do_197',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_197.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_197.h',
- ],
- },
- {
- 'action_name': 'do_198',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_198.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_198.h',
- ],
- },
- {
- 'action_name': 'do_199',
- 'inputs': [],
- 'outputs': ['<(PRODUCT_DIR)/generated_199.h'],
- 'action': [
- 'touch',
- '<(PRODUCT_DIR)/generated_199.h',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple build of a "Hello, world!" program with loadable modules. The
-default for all platforms should be to output the loadable modules to the same
-path as the executable.
-"""
-
-import TestGyp
-
-# Android doesn't support loadable modules
-test = TestGyp.TestGyp(formats=['!android'])
-
-test.run_gyp('module.gyp', chdir='src')
-
-test.build('module.gyp', test.ALL, chdir='src')
-
-expect = """\
-Hello from program.c
-Hello from lib1.c
-Hello from lib2.c
-"""
-test.run_built_executable('program', chdir='src', stdout=expect)
-
-test.pass_test()
+++ /dev/null
-#include <stdio.h>
-
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-void module_main(void)
-{
- fprintf(stdout, "Hello from lib1.c\n");
- fflush(stdout);
-}
+++ /dev/null
-#include <stdio.h>
-
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-void module_main(void)
-{
- fprintf(stdout, "Hello from lib2.c\n");
- fflush(stdout);
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'conditions': [
- ['OS=="win"', {
- 'defines': ['PLATFORM_WIN'],
- }],
- ['OS=="mac"', {
- 'defines': ['PLATFORM_MAC'],
- }],
- ['OS=="linux"', {
- 'defines': ['PLATFORM_LINUX'],
- # Support 64-bit shared libs (also works fine for 32-bit).
- 'cflags': ['-fPIC'],
- 'libraries': ['-ldl'],
- }],
- ],
- },
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'dependencies': [
- 'lib1',
- 'lib2',
- ],
- 'sources': [
- 'program.c',
- ],
- },
- {
- 'target_name': 'lib1',
- 'type': 'loadable_module',
- 'product_name': 'lib1',
- 'product_prefix': '',
- 'xcode_settings': {'OTHER_LDFLAGS': ['-dynamiclib'], 'MACH_O_TYPE': ''},
- 'sources': [
- 'lib1.c',
- ],
- },
- {
- 'target_name': 'lib2',
- 'product_name': 'lib2',
- 'product_prefix': '',
- 'type': 'loadable_module',
- 'xcode_settings': {'OTHER_LDFLAGS': ['-dynamiclib'], 'MACH_O_TYPE': ''},
- 'sources': [
- 'lib2.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-#include <stdlib.h>
-
-#if defined(PLATFORM_WIN)
-#include <windows.h>
-#elif defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
-#include <dlfcn.h>
-#include <libgen.h>
-#include <string.h>
-#include <sys/param.h>
-#define MAX_PATH PATH_MAX
-#endif
-
-#if defined(PLATFORM_WIN)
-#define MODULE_SUFFIX ".dll"
-#elif defined(PLATFORM_MAC)
-#define MODULE_SUFFIX ".so"
-#elif defined(PLATFORM_LINUX)
-#define MODULE_SUFFIX ".so"
-#endif
-
-typedef void (*module_symbol)(void);
-char bin_path[MAX_PATH + 1];
-
-
-void CallModule(const char* module) {
- char module_path[MAX_PATH + 1];
- const char* module_function = "module_main";
- module_symbol funcptr;
-#if defined(PLATFORM_WIN)
- HMODULE dl;
- char drive[_MAX_DRIVE];
- char dir[_MAX_DIR];
-
- if (_splitpath_s(bin_path, drive, _MAX_DRIVE, dir, _MAX_DIR,
- NULL, 0, NULL, 0)) {
- fprintf(stderr, "Failed to split executable path.\n");
- return;
- }
- if (_makepath_s(module_path, MAX_PATH, drive, dir, module, MODULE_SUFFIX)) {
- fprintf(stderr, "Failed to calculate module path.\n");
- return;
- }
-
- dl = LoadLibrary(module_path);
- if (!dl) {
- fprintf(stderr, "Failed to open module: %s\n", module_path);
- return;
- }
-
- funcptr = (module_symbol) GetProcAddress(dl, module_function);
- if (!funcptr) {
- fprintf(stderr, "Failed to find symbol: %s\n", module_function);
- return;
- }
- funcptr();
-
- FreeLibrary(dl);
-#elif defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
- void* dl;
- char* path_copy = strdup(bin_path);
- char* bin_dir = dirname(path_copy);
- int path_size = snprintf(module_path, MAX_PATH, "%s/%s%s", bin_dir, module,
- MODULE_SUFFIX);
- free(path_copy);
- if (path_size < 0 || path_size > MAX_PATH) {
- fprintf(stderr, "Failed to calculate module path.\n");
- return;
- }
- module_path[path_size] = 0;
-
- dl = dlopen(module_path, RTLD_LAZY);
- if (!dl) {
- fprintf(stderr, "Failed to open module: %s\n", module_path);
- return;
- }
-
- funcptr = dlsym(dl, module_function);
- if (!funcptr) {
- fprintf(stderr, "Failed to find symbol: %s\n", module_function);
- return;
- }
- funcptr();
-
- dlclose(dl);
-#endif
-}
-
-int main(int argc, char *argv[])
-{
- fprintf(stdout, "Hello from program.c\n");
- fflush(stdout);
-
-#if defined(PLATFORM_WIN)
- if (!GetModuleFileName(NULL, bin_path, MAX_PATH)) {
- fprintf(stderr, "Failed to determine executable path.\n");
- return;
- }
-#elif defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
- // Using argv[0] should be OK here since we control how the tests run, and
- // can avoid exec and such issues that make it unreliable.
- if (!realpath(argv[0], bin_path)) {
- fprintf(stderr, "Failed to determine executable path (%s).\n", argv[0]);
- return;
- }
-#endif
-
- CallModule("lib1");
- CallModule("lib2");
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that msvs_configuration_attributes and
-msbuild_configuration_attributes are applied by using
-them to set the OutputDirectory.
-"""
-
-import TestGyp
-import os
-
-test = TestGyp.TestGyp(workdir='workarea_all',formats=['msvs'])
-
-vc_version = 'VC90'
-
-if os.getenv('GYP_MSVS_VERSION'):
- vc_version = ['VC90','VC100'][int(os.getenv('GYP_MSVS_VERSION')) >= 2010]
-
-expected_exe_file = os.path.join(test.workdir, vc_version, 'hello.exe')
-
-test.run_gyp('hello.gyp')
-
-test.build('hello.gyp')
-
-test.must_exist(expected_exe_file)
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello, world!\n");
- return 0;
-}
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- 'msvs_configuration_attributes': {
- 'OutputDirectory':'$(SolutionDir)VC90/'
- },
- 'msbuild_configuration_attributes': {
- 'OutputDirectory':'$(SolutionDir)VC100/',
- },
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'static_library',
- 'sources': [
- 'a.c',
- ],
- },
- {
- 'target_name': 'b',
- 'type': 'static_library',
- 'sources': [
- 'b.c',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'express',
- 'type': 'executable',
- 'dependencies': [
- 'base/base.gyp:a',
- 'base/base.gyp:b',
- ],
- 'sources': [
- 'main.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that flat solutions get generated for Express versions of
-Visual Studio.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['msvs'])
-
-test.run_gyp('express.gyp', '-G', 'msvs_version=2005')
-test.must_contain('express.sln', '(base)')
-
-test.run_gyp('express.gyp', '-G', 'msvs_version=2008')
-test.must_contain('express.sln', '(base)')
-
-test.run_gyp('express.gyp', '-G', 'msvs_version=2005e')
-test.must_not_contain('express.sln', '(base)')
-
-test.run_gyp('express.gyp', '-G', 'msvs_version=2008e')
-test.must_not_contain('express.sln', '(base)')
-
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that msvs_list_excluded_files=0 doesn't list files that would
-normally be in _excluded_files, and that if that flag is not set, then they
-are still listed.
-"""
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['msvs'], workdir='workarea_all')
-
-
-# with the flag set to 0
-try:
- os.environ['GYP_GENERATOR_FLAGS'] = 'msvs_list_excluded_files=0'
- test.run_gyp('hello_exclude.gyp')
-finally:
- del os.environ['GYP_GENERATOR_FLAGS']
-if test.uses_msbuild:
- test.must_not_contain('hello.vcxproj', 'hello_mac')
-else:
- test.must_not_contain('hello.vcproj', 'hello_mac')
-
-
-# with the flag not set
-test.run_gyp('hello_exclude.gyp')
-if test.uses_msbuild:
- test.must_contain('hello.vcxproj', 'hello_mac')
-else:
- test.must_contain('hello.vcproj', 'hello_mac')
-
-
-# with the flag explicitly set to 1
-try:
- os.environ['GYP_GENERATOR_FLAGS'] = 'msvs_list_excluded_files=1'
- test.run_gyp('hello_exclude.gyp')
-finally:
- del os.environ['GYP_GENERATOR_FLAGS']
-if test.uses_msbuild:
- test.must_contain('hello.vcxproj', 'hello_mac')
-else:
- test.must_contain('hello.vcproj', 'hello_mac')
-
-
-test.pass_test()
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-
-int main(int argc, char *argv[]) {
- printf("Hello, world!\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello.cpp',
- 'hello_mac.cpp',
- ],
- 'conditions': [
- ['OS!="mac"', {'sources!': ['hello_mac.cpp']}],
- ]
- },
- ],
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-
-int hello2() {
- printf("Hello, two!\n");
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that missing 'sources' files are treated as fatal errors when the
-the generator flag 'msvs_error_on_missing_sources' is set.
-"""
-
-import TestGyp
-import os
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'], workdir='workarea_all')
-
- # With the flag not set
- test.run_gyp('hello_missing.gyp')
-
- # With the flag explicitly set to 0
- try:
- os.environ['GYP_GENERATOR_FLAGS'] = 'msvs_error_on_missing_sources=0'
- test.run_gyp('hello_missing.gyp')
- finally:
- del os.environ['GYP_GENERATOR_FLAGS']
-
- # With the flag explicitly set to 1
- try:
- os.environ['GYP_GENERATOR_FLAGS'] = 'msvs_error_on_missing_sources=1'
- # Test to make sure GYP raises an exception (exit status 1). Since this will
- # also print a backtrace, ensure that TestGyp is not checking that stderr is
- # empty by specifying None, which means do not perform any checking.
- # Instead, stderr is checked below to ensure it contains the expected
- # output.
- test.run_gyp('hello_missing.gyp', status=1, stderr=None)
- finally:
- del os.environ['GYP_GENERATOR_FLAGS']
- test.must_contain_any_line(test.stderr(),
- ["Missing input files:"])
-
- test.pass_test()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello_missing.cpp',
- ],
- },
- ],
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="UserMacros">
- <AppName>Greet</AppName>
- </PropertyGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemGroup>
- <BuildMacro Include="AppName">
- <Value>$(AppName)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="Common"
- >
- <UserMacro
- Name="AppName"
- Value="Greet"
- />
-</VisualStudioPropertySheet>
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies props files are added by using a
-props file to set the name of the built executable.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_all', formats=['msvs'])
-
-test.run_gyp('hello.gyp')
-
-test.build('hello.gyp')
-
-test.built_file_must_exist('Greet.exe')
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello, world!\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'product_name': '$(AppName)',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- 'msvs_props': [
- '$(SolutionDir)AppName.vsprops'
- ],
- 'msbuild_props': [
- '$(SolutionDir)AppName.props'
- ],
- },
- ],
-}
-
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'default_configuration': 'Baz',
- 'configurations': {
- 'Baz': {
- 'msvs_configuration_attributes': {
- 'OutputDirectory': '<(DEPTH)/foo',
- 'IntermediateDirectory': '$(OutDir)/bar',
- },
- },
- },
- },
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test checking that IntermediateDirectory can be defined in terms of
-OutputDirectory. We previously had emitted the definition of
-IntermediateDirectory before the definition of OutputDirectory.
-This is required so that $(IntDir) can be based on $(OutDir).
-"""
-
-import TestGyp
-import os
-
-# NOTE: This test really is vcbuild/msbuild specific (not applicable to windows
-# ninja), as it is testing the msvs output location when opening an .sln
-# other than all.sln.
-test = TestGyp.TestGyp(workdir='workarea_shared_output', formats=['msvs'])
-
-test.run_gyp('hello.gyp')
-test.set_configuration('Baz')
-
-test.build('there/there.gyp', test.ALL)
-test.must_exist(os.path.join(test.workdir, 'foo', 'there.exe'))
-test.must_exist(os.path.join(test.workdir, 'foo', 'bar', 'there.obj'))
-
-test.build('hello.gyp', test.ALL)
-test.must_exist(os.path.join(test.workdir, 'foo', 'hello.exe'))
-test.must_exist(os.path.join(test.workdir, 'foo', 'bar', 'hello.obj'))
-
-if test.format == 'msvs':
- if test.uses_msbuild:
- test.must_contain('pull_in_there.vcxproj',
- '<IntDir>$(OutDir)bar\\</IntDir>')
- else:
- test.must_contain('pull_in_there.vcproj',
- 'IntermediateDirectory="$(OutDir)bar\\"')
-
-test.pass_test()
+++ /dev/null
-/*
- * Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[]) {
- printf("Hello, world!\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': ['common.gypi'],
- 'targets': [
- {
- 'target_name': 'pull_in_there',
- 'type': 'none',
- 'dependencies': ['there/there.gyp:*'],
- },
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- },
- ],
-}
+++ /dev/null
-/*
- * Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[]) {
- printf("Hello, world!\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': ['../common.gypi'],
- 'targets': [
- {
- 'target_name': 'there',
- 'type': 'executable',
- 'sources': [
- 'there.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that uldi can be disabled on a per-project-reference basis in vs2010.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['msvs'], workdir='workarea_all')
-
-test.run_gyp('hello.gyp')
-
-if test.uses_msbuild:
- test.must_contain('hello.vcxproj', '<UseLibraryDependencyInputs>false')
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-extern int hello2();
-
-int main(int argc, char *argv[]) {
- printf("Hello, world!\n");
- hello2();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- 'dependencies': [
- 'hellolib',
- ]
- },
- {
- 'target_name': 'hellolib',
- 'type': 'static_library',
- 'sources': [
- 'hello2.c',
- ],
- 'msvs_2010_disable_uldi_when_referenced': 1,
- },
- ],
-}
+++ /dev/null
-/* Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int hello2() {
- printf("Hello, two!\n");
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('multiple.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-# TODO(sgk): remove stderr=None when the --generator-output= support
-# gets rid of the scons warning
-test.build('multiple.gyp', test.ALL, chdir='relocate/src', stderr=None)
-
-expect1 = """\
-hello from prog1.c
-hello from common.c
-"""
-
-expect2 = """\
-hello from prog2.c
-hello from common.c
-"""
-
-test.run_built_executable('prog1', stdout=expect1, chdir='relocate/src')
-test.run_built_executable('prog2', stdout=expect2, chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('multiple.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-# TODO(sgk): remove stderr=None when the --generator-output= support
-# gets rid of the scons warning
-test.build('multiple.gyp', chdir='relocate/src', stderr=None)
-
-expect1 = """\
-hello from prog1.c
-hello from common.c
-"""
-
-expect2 = """\
-hello from prog2.c
-hello from common.c
-"""
-
-test.run_built_executable('prog1', stdout=expect1, chdir='relocate/src')
-test.run_built_executable('prog2', stdout=expect2, chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#include <stdio.h>
-
-void common(void)
-{
- printf("hello from common.c\n");
- return;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'prog1',
- 'type': 'executable',
- 'sources': [
- 'prog1.c',
- 'common.c',
- ],
- },
- {
- 'target_name': 'prog2',
- 'type': 'executable',
- 'sources': [
- 'prog2.c',
- 'common.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void common(void);
-
-int main(int argc, char *argv[])
-{
- printf("hello from prog1.c\n");
- common();
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void common(void);
-
-int main(int argc, char *argv[])
-{
- printf("hello from prog2.c\n");
- common();
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that building an object file correctly depends on running actions in
-dependent targets, but not the targets themselves.
-"""
-
-import os
-import sys
-import TestGyp
-
-# NOTE(piman): This test will not work with other generators because:
-# - it explicitly tests the optimization, which is not implemented (yet?) on
-# other generators
-# - it relies on the exact path to output object files, which is generator
-# dependent, and actually, relies on the ability to build only that object file,
-# which I don't think is available on all generators.
-# TODO(piman): Extend to other generators when possible.
-test = TestGyp.TestGyp(formats=['ninja'])
-
-test.run_gyp('action_dependencies.gyp', chdir='src')
-
-chdir = 'relocate/src'
-test.relocate('src', chdir)
-
-objext = '.obj' if sys.platform == 'win32' else '.o'
-
-test.build('action_dependencies.gyp',
- os.path.join('obj', 'b.b' + objext),
- chdir=chdir)
-
-# The 'a' actions should be run (letting b.c compile), but the a static library
-# should not be built.
-test.built_file_must_not_exist('a', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_not_exist('b', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_exist(os.path.join('obj', 'b.b' + objext), chdir=chdir)
-
-test.build('action_dependencies.gyp',
- os.path.join('obj', 'c.c' + objext),
- chdir=chdir)
-
-# 'a' and 'b' should be built, so that the 'c' action succeeds, letting c.c
-# compile
-test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir)
-test.built_file_must_exist('b', type=test.EXECUTABLE, chdir=chdir)
-test.built_file_must_exist(os.path.join('obj', 'c.c' + objext), chdir=chdir)
-
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "a.h"
-
-int funcA() {
- return 42;
-}
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef A_H_
-#define A_H_
-
-#include "a/generated.h"
-
-int funcA();
-
-#endif // A_H_
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'static_library',
- 'sources': [
- 'a.c',
- 'a.h',
- ],
- 'actions': [
- {
- 'action_name': 'generate_headers',
- 'inputs': [
- 'emit.py'
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/a/generated.h'
- ],
- 'action': [
- 'python',
- 'emit.py',
- '<(SHARED_INTERMEDIATE_DIR)/a/generated.h',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- },
- },
- {
- 'target_name': 'b',
- 'type': 'executable',
- 'sources': [
- 'b.c',
- 'b.h',
- ],
- 'dependencies': [
- 'a',
- ],
- },
- {
- 'target_name': 'c',
- 'type': 'static_library',
- 'sources': [
- 'c.c',
- 'c.h',
- ],
- 'dependencies': [
- 'b',
- ],
- 'actions': [
- {
- 'action_name': 'generate_headers',
- 'inputs': [
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/c/generated.h'
- ],
- 'action': [
- '<(PRODUCT_DIR)/b',
- '<(SHARED_INTERMEDIATE_DIR)/c/generated.h',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- },
- },
- ],
-}
+++ /dev/null
-/* Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-#include "b.h"
-
-int main(int argc, char** argv) {
- FILE* f;
- if (argc < 2)
- return 1;
- f = fopen(argv[1], "wt");
- fprintf(f, "#define VALUE %d\n", funcA());
- fclose(f);
- return 0;
-}
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef B_H_
-#define B_H_
-
-#include "a.h"
-
-int funcB();
-
-#endif // B_H_
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "c.h"
-
-int funcC() {
- return VALUE;
-}
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef C_H_
-#define C_H_
-
-#include "c/generated.h"
-
-int funcC();
-
-#endif // C_H_
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-f = open(sys.argv[1], 'wb')
-f.write('/* Hello World */\n')
-f.close()
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # This first target generates a header.
- {
- 'target_name': 'generate_header',
- 'type': 'none',
- 'msvs_cygwin_shell': '0',
- 'actions': [
- {
- 'action_name': 'generate header',
- 'inputs': [],
- 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/generated/header.h'],
- 'action': [
- 'python', '-c', 'open(<(_outputs), "w")'
- ]
- },
- ],
- 'all_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- },
- },
-
- # This intermediate target does nothing other than pull in a
- # dependency on the above generated target.
- {
- 'target_name': 'chain',
- 'type': 'none',
- 'dependencies': [
- 'generate_header',
- ],
- },
-
- # This final target is:
- # - a static library (so gyp doesn't transitively pull in dependencies);
- # - that relies on the generated file two dependencies away.
- {
- 'target_name': 'chained',
- 'type': 'static_library',
- 'dependencies': [
- 'chain',
- ],
- 'sources': [
- 'chained.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include "generated/header.h"
-
-int main(int argc, char** argv) {
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that files generated by two-steps-removed actions are built before
-dependent compile steps.
-"""
-
-import os
-import sys
-import TestGyp
-
-# This test is Ninja-specific in that:
-# - the bug only showed nondeterministically in parallel builds;
-# - it relies on a ninja-specific output file path.
-
-test = TestGyp.TestGyp(formats=['ninja'])
-test.run_gyp('chained-dependency.gyp')
-objext = '.obj' if sys.platform == 'win32' else '.o'
-test.build('chained-dependency.gyp',
- os.path.join('obj', 'chained.chained' + objext))
-# The test passes if the .o file builds successfully.
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure paths are normalized with VS macros properly expanded on Windows.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['ninja'])
-
- test.run_gyp('normalize-paths.gyp')
-
- # We can't use existence tests because any case will pass, so we check the
- # contents of ninja files directly since that's what we're most concerned
- # with anyway.
- subninja = open(test.built_file_path('obj/some_target.ninja')).read()
- if '$!product_dir' in subninja:
- test.fail_test()
- if 'out\\Default' in subninja:
- test.fail_test()
-
- second = open(test.built_file_path('obj/second.ninja')).read()
- if ('..\\..\\things\\AnotherName.exe' in second or
- 'AnotherName.exe' not in second):
- test.fail_test()
-
- action = open(test.built_file_path('obj/action.ninja')).read()
- if '..\\..\\out\\Default' in action:
- test.fail_test()
- if '..\\..\\SomethingElse' in action or 'SomethingElse' not in action:
- test.fail_test()
- if '..\\..\\SomeOtherInput' in action or 'SomeOtherInput' not in action:
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'Some_Target',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '<(PRODUCT_DIR)/stuff/AnotherName.exe',
- },
- },
- 'sources': [
- 'HeLLo.cc',
- 'blOrP.idl',
- ],
- },
- {
- 'target_name': 'second',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '$(OutDir)\\things\\AnotherName.exe',
- },
- },
- 'sources': [
- 'HeLLo.cc',
- ],
- },
- {
- 'target_name': 'action',
- 'type': 'none',
- 'msvs_cygwin_shell': '0',
- 'actions': [
- {
- 'inputs': [
- '$(IntDir)\\SomeInput',
- '$(OutDir)\\SomeOtherInput',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/ReSuLt',
- '<(SHARED_INTERMEDIATE_DIR)/TempFile',
- '$(OutDir)\SomethingElse',
- ],
- 'action_name': 'Test action',
- # Unfortunately, we can't normalize this field because it's
- # free-form. Fortunately, ninja doesn't inspect it at all (only the
- # inputs and outputs) so it's not mandatory.
- 'action': [],
- },
- ],
- },
- ],
-}
+++ /dev/null
-# This file intentionally left blank.
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that .s files don't always trigger a rebuild, as would happen if depfiles
-were used for them (since clang & gcc ignore -MMD when building .s->.o on
-linux).
-"""
-
-import os
-import sys
-import TestCommon
-import TestGyp
-
-# NOTE(fischman): Each generator uses depfiles (or not) differently, so this is
-# a ninja-specific test.
-test = TestGyp.TestGyp(formats=['ninja'])
-
-if sys.platform == 'win32' or sys.platform == 'win64':
- # This test is about clang/gcc vs. depfiles; VS gets a pass.
- test.pass_test()
- sys.exit(0)
-
-test.run_gyp('s-needs-no-depfiles.gyp')
-
-# Build the library, grab its timestamp, rebuild the library, ensure timestamp
-# hasn't changed.
-test.build('s-needs-no-depfiles.gyp', 'empty')
-empty_dll = test.built_file_path('empty', test.SHARED_LIB)
-test.built_file_must_exist(empty_dll)
-pre_stat = os.stat(test.built_file_path(empty_dll))
-test.sleep()
-test.build('s-needs-no-depfiles.gyp', 'empty')
-post_stat = os.stat(test.built_file_path(empty_dll))
-
-if pre_stat.st_mtime != post_stat.st_mtime:
- test.fail_test()
-else:
- test.pass_test()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'empty',
- 'type': 'shared_library',
- 'sources': [ 'empty.s' ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that relinking a solib doesn't relink a dependent executable if the
-solib's public API hasn't changed.
-"""
-
-import os
-import sys
-import TestCommon
-import TestGyp
-
-# NOTE(fischman): This test will not work with other generators because the
-# API-hash-based-mtime-preservation optimization is only implemented in
-# ninja.py. It could be extended to the make.py generator as well pretty
-# easily, probably.
-# (also, it tests ninja-specific out paths, which would have to be generalized
-# if this was extended to other generators).
-test = TestGyp.TestGyp(formats=['ninja'])
-
-test.run_gyp('solibs_avoid_relinking.gyp')
-
-# Build the executable, grab its timestamp, touch the solib's source, rebuild
-# executable, ensure timestamp hasn't changed.
-test.build('solibs_avoid_relinking.gyp', 'b')
-test.built_file_must_exist('b' + TestCommon.exe_suffix)
-pre_stat = os.stat(test.built_file_path('b' + TestCommon.exe_suffix))
-os.utime(os.path.join(test.workdir, 'solib.cc'),
- (pre_stat.st_atime, pre_stat.st_mtime + 100))
-test.sleep()
-test.build('solibs_avoid_relinking.gyp', 'b')
-post_stat = os.stat(test.built_file_path('b' + TestCommon.exe_suffix))
-
-if pre_stat.st_mtime != post_stat.st_mtime:
- test.fail_test()
-else:
- test.pass_test()
+++ /dev/null
-extern int foo();
-
-int main() {
- return foo();
-}
+++ /dev/null
-#ifdef _MSC_VER
-__declspec(dllexport)
-#else
-__attribute__((visibility("default")))
-#endif
-int foo() {
- return 42;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'shared_library',
- 'sources': [ 'solib.cc' ],
- # Incremental linking enabled so that .lib timestamp is maintained when
- # exports are unchanged.
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '2',
- }
- },
- },
- {
- 'target_name': 'b',
- 'type': 'executable',
- 'sources': [ 'main.cc' ],
- 'dependencies': [ 'a' ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '2',
- }
- },
- },
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'target_defaults': {
- 'cflags': ['-fPIC'],
- },
- }],
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verified things don't explode when there are targets without outputs.
-"""
-
-import TestGyp
-
-# TODO(evan): in ninja when there are no targets, there is no 'all'
-# target either. Disabling this test for now.
-test = TestGyp.TestGyp(formats=['!ninja'])
-
-test.run_gyp('nooutput.gyp', chdir='src')
-test.relocate('src', 'relocate/src')
-test.build('nooutput.gyp', chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'no_output',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'defines': [
- 'NADA',
- ],
- },
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simplest-possible build of a "Hello, world!" program
-using the default build target.
-"""
-
-import TestGyp
-
-# Android does not support setting the build directory.
-test = TestGyp.TestGyp(formats=['!android'])
-
-test.run_gyp('product.gyp')
-test.build('product.gyp')
-
-# executables
-test.built_file_must_exist('alt1' + test._exe, test.EXECUTABLE, bare=True)
-test.built_file_must_exist('hello2.stuff', test.EXECUTABLE, bare=True)
-test.built_file_must_exist('yoalt3.stuff', test.EXECUTABLE, bare=True)
-
-# shared libraries
-test.built_file_must_exist(test.dll_ + 'alt4' + test._dll,
- test.SHARED_LIB, bare=True)
-test.built_file_must_exist(test.dll_ + 'hello5.stuff',
- test.SHARED_LIB, bare=True)
-test.built_file_must_exist('yoalt6.stuff', test.SHARED_LIB, bare=True)
-
-# static libraries
-test.built_file_must_exist(test.lib_ + 'alt7' + test._lib,
- test.STATIC_LIB, bare=True)
-test.built_file_must_exist(test.lib_ + 'hello8.stuff',
- test.STATIC_LIB, bare=True)
-test.built_file_must_exist('yoalt9.stuff', test.STATIC_LIB, bare=True)
-
-# alternate product_dir
-test.built_file_must_exist('bob/yoalt10.stuff', test.EXECUTABLE, bare=True)
-test.built_file_must_exist('bob/yoalt11.stuff', test.EXECUTABLE, bare=True)
-test.built_file_must_exist('bob/yoalt12.stuff', test.EXECUTABLE, bare=True)
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int func1(void) {
- return 42;
-}
-
-int main(int argc, char *argv[]) {
- printf("Hello, world!\n");
- printf("%d\n", func1());
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello1',
- 'product_name': 'alt1',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello2',
- 'product_extension': 'stuff',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello3',
- 'product_name': 'alt3',
- 'product_extension': 'stuff',
- 'product_prefix': 'yo',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- },
-
- {
- 'target_name': 'hello4',
- 'product_name': 'alt4',
- 'type': 'shared_library',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello5',
- 'product_extension': 'stuff',
- 'type': 'shared_library',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello6',
- 'product_name': 'alt6',
- 'product_extension': 'stuff',
- 'product_prefix': 'yo',
- 'type': 'shared_library',
- 'sources': [
- 'hello.c',
- ],
- },
-
- {
- 'target_name': 'hello7',
- 'product_name': 'alt7',
- 'type': 'static_library',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello8',
- 'product_extension': 'stuff',
- 'type': 'static_library',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello9',
- 'product_name': 'alt9',
- 'product_extension': 'stuff',
- 'product_prefix': 'yo',
- 'type': 'static_library',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello10',
- 'product_name': 'alt10',
- 'product_extension': 'stuff',
- 'product_prefix': 'yo',
- 'product_dir': '<(PRODUCT_DIR)/bob',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello11',
- 'product_name': 'alt11',
- 'product_extension': 'stuff',
- 'product_prefix': 'yo',
- 'product_dir': '<(PRODUCT_DIR)/bob',
- 'type': 'shared_library',
- 'sources': [
- 'hello.c',
- ],
- },
- {
- 'target_name': 'hello12',
- 'product_name': 'alt12',
- 'product_extension': 'stuff',
- 'product_prefix': 'yo',
- 'product_dir': '<(PRODUCT_DIR)/bob',
- 'type': 'static_library',
- 'sources': [
- 'hello.c',
- ],
- },
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'target_defaults': {
- 'cflags': ['-fPIC'],
- },
- }],
- ],
-}
+++ /dev/null
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-int main() {
- return 0;
-}
+++ /dev/null
-{
- 'targets': [
- {
- 'target_name': 'a',
- 'type': 'executable',
- 'sources': ['a.cc'],
- 'dependencies': [
- '../../foo/b/b.gyp:b',
- 'c/c.gyp:c',
- ],
- },
- ],
-}
+++ /dev/null
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-int func() {
- return 0;
-}
+++ /dev/null
-{
- 'targets': [
- {
- 'target_name': 'c',
- 'type': 'static_library',
- 'sources': ['c.cc'],
- 'dependencies': [
- '../../b/b.gyp:b',
- ],
- },
- ],
-}
+++ /dev/null
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-int func2() {
- return 0;
-}
+++ /dev/null
-{
- 'targets': [
- {
- 'target_name': 'b',
- 'type': 'static_library',
- 'sources': ['b.cc'],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simplest-possible build of a "Hello, world!" program
-using the default build target.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_default', formats=['msvs'])
-
-# Run from down in foo.
-test.run_gyp('a.gyp', chdir='foo/a')
-sln = test.workpath('foo/a/a.sln')
-sln_data = open(sln, 'rb').read()
-vcproj = sln_data.count('b.vcproj')
-vcxproj = sln_data.count('b.vcxproj')
-if (vcproj, vcxproj) not in [(1, 0), (0, 1)]:
- test.fail_test()
-
-test.pass_test()
+++ /dev/null
-int main() {}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'filecaserename_sensitive',
- 'type': 'executable',
- 'sources': [
- 'FiLe.c',
- 'fIlE.c',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'filecaserename',
- 'type': 'executable',
- 'sources': [
- 'file.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Checks that files whose file case changes get rebuilt correctly.
-"""
-
-import os
-import TestGyp
-
-test = TestGyp.TestGyp()
-CHDIR = 'filecase'
-test.run_gyp('test.gyp', chdir=CHDIR)
-test.build('test.gyp', test.ALL, chdir=CHDIR)
-
-os.rename('filecase/file.c', 'filecase/fIlE.c')
-test.write('filecase/test.gyp',
- test.read('filecase/test.gyp').replace('file.c', 'fIlE.c'))
-test.run_gyp('test.gyp', chdir=CHDIR)
-test.build('test.gyp', test.ALL, chdir=CHDIR)
-
-
-# Check that having files that differ just in their case still work on
-# case-sensitive file systems.
-test.write('filecase/FiLe.c', 'int f(); int main() { return f(); }')
-test.write('filecase/fIlE.c', 'int f() { return 42; }')
-is_case_sensitive = test.read('filecase/FiLe.c') != test.read('filecase/fIlE.c')
-if is_case_sensitive:
- test.run_gyp('test-casesensitive.gyp', chdir=CHDIR)
- test.build('test-casesensitive.gyp', test.ALL, chdir=CHDIR)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify that dependent rules are executed iff a dependency action modifies its
-outputs.
-"""
-
-import TestGyp
-import os
-
-test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
-
-test.run_gyp('restat.gyp', chdir='src')
-
-chdir = 'relocate/src'
-test.relocate('src', chdir)
-
-# Building 'dependent' the first time generates 'side_effect', but building it
-# the second time doesn't, because 'create_intermediate' doesn't update its
-# output.
-test.build('restat.gyp', 'dependent', chdir=chdir)
-test.built_file_must_exist('side_effect', chdir=chdir)
-os.remove(test.built_file_path('side_effect', chdir=chdir))
-test.build('restat.gyp', 'dependent', chdir=chdir)
-test.built_file_must_not_exist('side_effect', chdir=chdir)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-"""
-Create argv[1] iff it doesn't already exist.
-"""
-
-outfile = sys.argv[1]
-if os.path.exists(outfile):
- sys.exit()
-open(outfile, "wb").close()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'create_intermediate',
- 'type': 'none',
- 'msvs_cygwin_shell': '0',
- 'actions': [
- {
- 'action_name': 'create_intermediate',
- 'inputs': [
- 'create_intermediate.py',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/intermediate',
- 'ALWAYS.run.ALWAYS',
- ],
- 'action': [
- 'python', 'create_intermediate.py', '<(PRODUCT_DIR)/intermediate',
- ],
- },
- ],
- },
- {
- 'target_name': 'dependent',
- 'type': 'none',
- 'msvs_cygwin_shell': '0',
- 'dependencies': [
- 'create_intermediate',
- ],
- 'actions': [
- {
- 'action_name': 'dependent',
- 'inputs': [
- '<(PRODUCT_DIR)/intermediate',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/dependent'
- ],
- 'action': [
- 'python', 'touch.py', '<(PRODUCT_DIR)/dependent', '<(PRODUCT_DIR)/side_effect',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-#
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-"""Cross-platform touch."""
-
-for fname in sys.argv[1:]:
- if os.path.exists(fname):
- os.utime(fname, None)
- else:
- open(fname, 'w').close()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple rules when using an explicit build target of 'all'.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode'])
-
-test.run_gyp('actions.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('actions.gyp', chdir='relocate/src')
-
-expect = """\
-hi c
-hello baz
-"""
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('gencc_int_output', chdir=chdir, stdout=expect)
-
-if test.format == 'msvs':
- test.must_exist('relocate/src/subdir/foo/bar/baz.printed')
- test.must_exist('relocate/src/subdir/a/b/c.printed')
-else:
- test.must_match('relocate/src/subdir/foo/bar/baz.printed', 'foo/bar')
- test.must_match('relocate/src/subdir/a/b/c.printed', 'a/b')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'pull_in_all_actions',
- 'type': 'none',
- 'dependencies': [
- 'subdir/input-rule-dirname.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import sys
-
-contents = open(sys.argv[1], 'r').read()
-open(sys.argv[2], 'wb').write(contents)
-
-sys.exit(0)
+++ /dev/null
-// -*- mode: c++ -*-
-#include <iostream>
-
-using std::cout;
-using std::endl;
-
-namespace gen {
- void c() {
- cout << "hi c" << endl;
- }
-}
+++ /dev/null
-# Empty file for testing build rules
+++ /dev/null
-// -*- mode: c++ -*-
-#include <iostream>
-
-using std::cout;
-using std::endl;
-
-namespace gen {
- void baz() {
- cout << "hello baz" << endl;
- }
-}
+++ /dev/null
-# Empty file for testing build rules
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'print_rule_input_path',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'foo/bar/baz.printvars',
- 'a/b/c.printvars',
- ],
- 'rules': [
- {
- 'rule_name': 'printvars',
- 'extension': 'printvars',
- 'inputs': [
- 'printvars.py',
- ],
- 'outputs': [
- '<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).printed',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<(RULE_INPUT_DIRNAME)', '<@(_outputs)',
- ],
- },
- ],
- },
- {
- 'target_name': 'gencc_int_output',
- 'type': 'executable',
- 'msvs_cygwin_shell': 0,
- 'msvs_cygwin_dirs': ['../../../../../../<(DEPTH)/third_party/cygwin'],
- 'sources': [
- 'foo/bar/baz.gencc',
- 'a/b/c.gencc',
- 'main.cc',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'dependencies': [
- 'cygwin',
- ],
- }],
- ],
- 'rules': [
- {
- 'rule_name': 'gencc',
- 'extension': 'gencc',
- 'msvs_external_rule': 1,
- 'inputs': [
- '<(DEPTH)/copy-file.py',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).cc',
- ],
- 'action': [
- 'python', '<@(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
- 'conditions': [
- ['OS=="win"', {
- 'targets': [
- {
- 'target_name': 'cygwin',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'setup_mount',
- 'msvs_cygwin_shell': 0,
- 'inputs': [
- '../../../../../../<(DEPTH)/third_party/cygwin/setup_mount.bat',
- ],
- # Visual Studio requires an output file, or else the
- # custom build step won't run.
- 'outputs': [
- '<(INTERMEDIATE_DIR)/_always_run_setup_mount.marker',
- ],
- 'action': ['<@(_inputs)'],
- },
- ],
- },
- ],
- }],
- ],
-}
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-namespace gen {
- extern void c();
- extern void baz();
-}
-
-int main() {
- gen::c();
- gen::baz();
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Prints interesting vars
-"""
-
-import sys;
-
-out = open(sys.argv[2], 'w')
-out.write(sys.argv[1]);
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a rule that generates multiple outputs rebuilds
-correctly when the inputs change.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_all')
-
-test.run_gyp('same_target.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-
-test.build('same_target.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from main.c
-Hello from prog1.in!
-Hello from prog2.in!
-"""
-
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
-
-
-test.sleep()
-contents = test.read(['relocate', 'src', 'prog1.in'])
-contents = contents.replace('!', ' AGAIN!')
-test.write(['relocate', 'src', 'prog1.in'], contents)
-
-test.build('same_target.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from main.c
-Hello from prog1.in AGAIN!
-Hello from prog2.in!
-"""
-
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
-
-
-test.sleep()
-contents = test.read(['relocate', 'src', 'prog2.in'])
-contents = contents.replace('!', ' AGAIN!')
-test.write(['relocate', 'src', 'prog2.in'], contents)
-
-test.build('same_target.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from main.c
-Hello from prog1.in AGAIN!
-Hello from prog2.in AGAIN!
-"""
-
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
-
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a rule that generates multiple outputs rebuilds
-correctly when the inputs change.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(workdir='workarea_default')
-
-test.run_gyp('same_target.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-
-test.build('same_target.gyp', chdir='relocate/src')
-
-expect = """\
-Hello from main.c
-Hello from prog1.in!
-Hello from prog2.in!
-"""
-
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
-
-
-test.sleep()
-contents = test.read(['relocate', 'src', 'prog1.in'])
-contents = contents.replace('!', ' AGAIN!')
-test.write(['relocate', 'src', 'prog1.in'], contents)
-
-test.build('same_target.gyp', chdir='relocate/src')
-
-expect = """\
-Hello from main.c
-Hello from prog1.in AGAIN!
-Hello from prog2.in!
-"""
-
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
-
-
-test.sleep()
-contents = test.read(['relocate', 'src', 'prog2.in'])
-contents = contents.replace('!', ' AGAIN!')
-test.write(['relocate', 'src', 'prog2.in'], contents)
-
-test.build('same_target.gyp', chdir='relocate/src')
-
-expect = """\
-Hello from main.c
-Hello from prog1.in AGAIN!
-Hello from prog2.in AGAIN!
-"""
-
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
-
-
-# Test that modifying a rule's inputs (specifically, make-sources.py) causes
-# the targets to be built.
-
-test.sleep()
-contents = test.read(['relocate', 'src', 'make-sources.py'])
-contents = contents.replace('%s', 'the amazing %s')
-test.write(['relocate', 'src', 'make-sources.py'], contents)
-
-test.build('same_target.gyp', chdir='relocate/src')
-
-expect = """\
-Hello from main.c
-Hello from the amazing prog1.in AGAIN!
-Hello from the amazing prog2.in AGAIN!
-"""
-
-test.run_built_executable('program', chdir='relocate/src', stdout=expect)
-
-test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
-
-
-test.pass_test()
+++ /dev/null
-#include <stdio.h>
-
-extern void prog1(void);
-extern void prog2(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from main.c\n");
- prog1();
- prog2();
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-assert len(sys.argv) == 4, sys.argv
-
-(in_file, c_file, h_file) = sys.argv[1:]
-
-def write_file(filename, contents):
- open(filename, 'wb').write(contents)
-
-write_file(c_file, open(in_file, 'rb').read())
-
-write_file(h_file, '#define NAME "%s"\n' % in_file)
-
-sys.exit(0)
+++ /dev/null
-#include <stdio.h>
-#include "prog1.h"
-
-void prog1(void)
-{
- printf("Hello from %s!\n", NAME);
-}
+++ /dev/null
-#include <stdio.h>
-#include "prog2.h"
-
-void prog2(void)
-{
- printf("Hello from %s!\n", NAME);
-}
+++ /dev/null
-{
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'main.c',
- 'prog1.in',
- 'prog2.in',
- ],
- 'rules': [
- {
- 'rule_name': 'make_sources',
- 'extension': 'in',
- 'inputs': [
- 'make-sources.py',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c',
- '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).h',
- ],
- 'action': [
- 'python', '<(_inputs)', '<(RULE_INPUT_NAME)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies rules related variables are expanded.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['ninja'])
-
-test.relocate('src', 'relocate/src')
-
-test.run_gyp('variables.gyp', chdir='relocate/src')
-
-test.build('variables.gyp', chdir='relocate/src')
-
-test.run_built_executable('all_rule_variables',
- chdir='relocate/src',
- stdout="input_root\ninput_dirname\ninput_path\n" +
- "input_ext\ninput_name\n")
-
-test.pass_test()
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-
-void input_ext() {
- printf("input_ext\n");
-}
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-
-void input_name() {
- printf("input_name\n");
-}
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-
-void input_path() {
- printf("input_path\n");
-}
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-
-void input_dirname() {
- printf("input_dirname\n");
-}
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-extern void input_root();
-extern void input_dirname();
-extern void input_path();
-extern void input_ext();
-extern void input_name();
-
-int main() {
- input_root();
- input_dirname();
- input_path();
- input_ext();
- input_name();
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdio.h>
-
-void input_root() {
- printf("input_root\n");
-}
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- # This test shouldn't ever actually need to execute its rules: there's no
- # command line that generates any output anyway. However, there's something
- # slightly broken in either ninja or (maybe more likely?) on the win32 VM
- # gypbots that breaks dependency checking and causes this rule to want to
- # run. When it does run, the cygwin path is wrong, so the do-nothing step
- # fails.
- # TODO: Investigate and fix whatever's actually failing and remove this.
- 'msvs_cygwin_dirs': ['../../../../../../<(DEPTH)/third_party/cygwin'],
- },
- 'targets': [
- {
- 'target_name': 'all_rule_variables',
- 'type': 'executable',
- 'sources': [
- 'subdir/test.c',
- ],
- 'rules': [
- {
- 'rule_name': 'rule_variable',
- 'extension': 'c',
- 'outputs': [
- '<(RULE_INPUT_ROOT).input_root.c',
- '<(RULE_INPUT_DIRNAME)/input_dirname.c',
- 'input_path/<(RULE_INPUT_PATH)',
- 'input_ext<(RULE_INPUT_EXT)',
- 'input_name/<(RULE_INPUT_NAME)',
- ],
- 'action': [],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple rules when using an explicit build target of 'all'.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('no_action_with_rules_fails.gyp', chdir='src/noaction', status=1,
- stderr=None)
-
-test.run_gyp('actions.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('actions.gyp', test.ALL, chdir='relocate/src')
-
-expect = """\
-Hello from program.c
-Hello from function1.in
-Hello from function2.in
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir1'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('program', chdir=chdir, stdout=expect)
-
-expect = """\
-Hello from program.c
-Hello from function3.in
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir3'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('program2', chdir=chdir, stdout=expect)
-
-test.must_match('relocate/src/subdir2/file1.out', 'Hello from file1.in\n')
-test.must_match('relocate/src/subdir2/file2.out', 'Hello from file2.in\n')
-
-test.must_match('relocate/src/subdir2/file1.out2', 'Hello from file1.in\n')
-test.must_match('relocate/src/subdir2/file2.out2', 'Hello from file2.in\n')
-
-test.must_match('relocate/src/external/file1.external_rules.out',
- 'Hello from file1.in\n')
-test.must_match('relocate/src/external/file2.external_rules.out',
- 'Hello from file2.in\n')
-
-expect = """\
-Hello from program.c
-Got 41.
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir4'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('program4', chdir=chdir, stdout=expect)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies simple rules when using an explicit build target of 'all'.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('actions.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('actions.gyp', chdir='relocate/src')
-
-expect = """\
-Hello from program.c
-Hello from function1.in
-Hello from function2.in
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir1'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('program', chdir=chdir, stdout=expect)
-
-expect = """\
-Hello from program.c
-Hello from function3.in
-"""
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir3'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('program2', chdir=chdir, stdout=expect)
-
-test.must_match('relocate/src/subdir2/file1.out', 'Hello from file1.in\n')
-test.must_match('relocate/src/subdir2/file2.out', 'Hello from file2.in\n')
-
-test.must_match('relocate/src/subdir2/file1.out2', 'Hello from file1.in\n')
-test.must_match('relocate/src/subdir2/file2.out2', 'Hello from file2.in\n')
-
-test.must_match('relocate/src/external/file1.external_rules.out',
- 'Hello from file1.in\n')
-test.must_match('relocate/src/external/file2.external_rules.out',
- 'Hello from file2.in\n')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that RULE_INPUT_ROOT isn't turned into a path in rule actions
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('input-root.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('input-root.gyp', target='test', chdir='relocate/src')
-
-expect = """\
-Hello somefile
-"""
-
-test.run_built_executable('test', chdir='relocate/src', stdout=expect)
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-""" Verifies that VS variables that require special variables are expanded
-correctly. """
-
-import sys
-import TestGyp
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp()
-
- test.run_gyp('special-variables.gyp', chdir='src')
- test.build('special-variables.gyp', test.ALL, chdir='src')
- test.pass_test()
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'pull_in_all_actions',
- 'type': 'none',
- 'dependencies': [
- 'subdir1/executable.gyp:*',
- 'subdir2/never_used.gyp:*',
- 'subdir2/no_inputs.gyp:*',
- 'subdir2/no_action.gyp:*',
- 'subdir2/none.gyp:*',
- 'subdir3/executable2.gyp:*',
- 'subdir4/build-asm.gyp:*',
- 'external/external.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Fake asm file.
-int main() {}
+++ /dev/null
-@echo off\r
-:: Copyright (c) 2011 Google Inc. All rights reserved.\r
-:: Use of this source code is governed by a BSD-style license that can be\r
-:: found in the LICENSE file.\r
-\r
-:: Fake assembler for Windows\r
-cl /TP /c %1 /Fo%2\r
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import sys
-
-contents = open(sys.argv[1], 'r').read()
-open(sys.argv[2], 'wb').write(contents)
-
-sys.exit(0)
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Test that the case where there are no inputs (other than the
-# file the rule applies to).
-{
- 'target_defaults': {
- 'msvs_cygwin_dirs': ['../../../../../../<(DEPTH)/third_party/cygwin'],
- },
- 'targets': [
- {
- 'target_name': 'external_rules',
- 'type': 'none',
- 'sources': [
- 'file1.in',
- 'file2.in',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'dependencies': [
- 'cygwin',
- ],
- }],
- ],
- 'rules': [
- {
- 'rule_name': 'copy_file',
- 'extension': 'in',
- 'msvs_external_rule': 1,
- 'outputs': [
- '<(RULE_INPUT_ROOT).external_rules.out',
- ],
- 'action': [
- 'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- },
- ],
- },
- ],
- 'conditions': [
- ['OS=="win"', {
- 'targets': [
- {
- 'target_name': 'cygwin',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'setup_mount',
- 'msvs_cygwin_shell': 0,
- 'inputs': [
- '../../../../../../<(DEPTH)/third_party/cygwin/setup_mount.bat',
- ],
- # Visual Studio requires an output file, or else the
- # custom build step won't run.
- 'outputs': [
- '<(INTERMEDIATE_DIR)/_always_run_setup_mount.marker',
- ],
- 'action': ['<@(_inputs)'],
- },
- ],
- },
- ],
- }],
- ],
-}
+++ /dev/null
-Hello from file1.in
+++ /dev/null
-Hello from file2.in
+++ /dev/null
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test',
- 'type': 'executable',
- 'sources': [ 'somefile.ext', ],
- 'rules': [{
- 'rule_name': 'rule',
- 'extension': 'ext',
- 'inputs': [ 'rule.py', ],
- 'outputs': [ '<(RULE_INPUT_ROOT).cc', ],
- 'action': [ 'python', 'rule.py', '<(RULE_INPUT_ROOT)', ],
- 'message': 'Processing <(RULE_INPUT_PATH)',
- 'process_outputs_as_sources': 1,
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- }],
- },
- ],
-}
+++ /dev/null
-Hello from file1.in
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Test the case where there's no action but there are input rules that should
-# be processed results in a gyp failure.
-{
- 'targets': [
- {
- 'target_name': 'extension_does_match_sources_but_no_action',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'file1.in',
- ],
- 'rules': [
- {
- 'rule_name': 'assembled',
- 'extension': 'in',
- 'outputs': [
- '<(RULE_INPUT_ROOT).in',
- ],
- 'conditions': [
- # Always fails.
- [ '"true"=="false"', {
- 'action': [
- 'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- 'message': 'test_rule',
- }],
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-f = open(sys.argv[1] + ".cc", "w")
-f.write("""\
-#include <stdio.h>
-
-int main() {
- puts("Hello %s");
- return 0;
-}
-""" % sys.argv[1])
-f.close()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'rules': [
- {
- 'rule_name': 'assembler (gnu-compatible)',
- 'msvs_cygwin_shell': 0,
- 'msvs_quote_cmd': 0,
- 'extension': 'S',
- 'inputs': [
- 'as.bat',
- '$(InputPath)'
- ],
- 'outputs': [
- '$(IntDir)/$(InputName).obj',
- ],
- 'action': [
- 'as.bat',
- '$(InputPath)',
- '$(IntDir)/$(InputName).obj',
- ],
- 'message': 'Building assembly language file $(InputPath)',
- 'process_outputs_as_sources': 1,
- },
- ],
- 'target_name': 'test',
- 'type': 'static_library',
- 'sources': [ 'an_asm.S' ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'program.c',
- 'function1.in',
- 'function2.in',
- ],
- 'rules': [
- {
- 'rule_name': 'copy_file',
- 'extension': 'in',
- 'inputs': [
- '../copy-file.py',
- ],
- 'outputs': [
- # TODO: fix SCons and Make to support generated files not
- # in a variable-named path like <(INTERMEDIATE_DIR)
- #'<(RULE_INPUT_ROOT).c',
- '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c',
- ],
- 'action': [
- 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-void function1(void)
-{
- printf("Hello from function1.in\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-void function2(void)
-{
- printf("Hello from function2.in\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void function1(void);
-extern void function2(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from program.c\n");
- function1();
- function2();
- return 0;
-}
+++ /dev/null
-Hello from file1.in
+++ /dev/null
-Hello from file2.in
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Test that the case where there is a rule that doesn't apply to anything.
-{
- 'targets': [
- {
- 'target_name': 'files_no_input2',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'file1.in',
- 'file2.in',
- ],
- 'rules': [
- {
- 'rule_name': 'copy_file3',
- 'extension': 'in2',
- 'outputs': [
- '<(RULE_INPUT_ROOT).out3',
- ],
- 'action': [
- 'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Test that the case where an action is only specified under a conditional is
-# evaluated appropriately.
-{
- 'targets': [
- {
- 'target_name': 'extension_does_not_match_sources_and_no_action',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'file1.in',
- 'file2.in',
- ],
- 'rules': [
- {
- 'rule_name': 'assemble',
- 'extension': 'asm',
- 'outputs': [
- '<(RULE_INPUT_ROOT).fail',
- ],
- 'conditions': [
- # Always fails.
- [ '"true"=="false"', {
- 'action': [
- 'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- 'message': 'test_rule',
- }],
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Test that the case where there are no inputs (other than the
-# file the rule applies to).
-{
- 'targets': [
- {
- 'target_name': 'files_no_input',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'file1.in',
- 'file2.in',
- ],
- 'rules': [
- {
- 'rule_name': 'copy_file2',
- 'extension': 'in',
- 'outputs': [
- '<(RULE_INPUT_ROOT).out2',
- ],
- 'action': [
- 'python', '../copy-file.py', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'files',
- 'type': 'none',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'file1.in',
- 'file2.in',
- ],
- 'rules': [
- {
- 'rule_name': 'copy_file',
- 'extension': 'in',
- 'inputs': [
- '../copy-file.py',
- ],
- 'outputs': [
- '<(RULE_INPUT_ROOT).out',
- ],
- 'action': [
- 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This one tests that rules are properly written if extensions are different
-# between the target's sources (program.c) and the generated files
-# (function3.cc)
-
-{
- 'targets': [
- {
- 'target_name': 'program2',
- 'type': 'executable',
- 'msvs_cygwin_shell': 0,
- 'sources': [
- 'program.c',
- 'function3.in',
- ],
- 'rules': [
- {
- 'rule_name': 'copy_file',
- 'extension': 'in',
- 'inputs': [
- '../copy-file.py',
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).cc',
- ],
- 'action': [
- 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-extern "C" void function3(void)
-{
- printf("Hello from function3.in\n");
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void function3(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from program.c\n");
- function3();
- return 0;
-}
+++ /dev/null
-#if PLATFORM_WINDOWS || PLATFORM_MAC
-# define IDENTIFIER(n) _##n
-#else /* Linux */
-# define IDENTIFIER(n) n
-#endif
-
-.globl IDENTIFIER(asm_function)
-IDENTIFIER(asm_function):
- movl $41, %eax
- ret
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This one tests that assembly files ended as .s and .S are compiled.
-
-{
- 'target_defaults': {
- 'conditions': [
- ['OS=="win"', {
- 'defines': ['PLATFORM_WIN'],
- }],
- ['OS=="mac"', {
- 'defines': ['PLATFORM_MAC'],
- }],
- ['OS=="linux"', {
- 'defines': ['PLATFORM_LINUX'],
- }],
- ],
- },
- 'targets': [
- {
- 'target_name': 'program4',
- 'type': 'executable',
- 'sources': [
- 'asm-function.asm',
- 'program.c',
- ],
- 'conditions': [
- ['OS=="linux" or OS=="mac"', {
- 'rules': [
- {
- 'rule_name': 'convert_asm',
- 'extension': 'asm',
- 'inputs': [],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).S',
- ],
- 'action': [
- 'bash', '-c', 'mv <(RULE_INPUT_PATH) <@(_outputs)',
- ],
- 'process_outputs_as_sources': 1,
- },
- ],
- }],
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-// Use the assembly function in linux and mac where it is built.
-#if PLATFORM_LINUX || PLATFORM_MAC
-extern int asm_function(void);
-#else
-int asm_function() {
- return 41;
-}
-#endif
-
-int main(int argc, char *argv[])
-{
- fprintf(stdout, "Hello from program.c\n");
- fflush(stdout);
- fprintf(stdout, "Got %d.\n", asm_function());
- fflush(stdout);
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Build a .gyp that depends on 2 gyp files with the same name.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('all.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('all.gyp', test.ALL, chdir='relocate/src')
-
-expect1 = """\
-Hello from main1.cc
-"""
-
-expect2 = """\
-Hello from main2.cc
-"""
-
-if test.format == 'xcode':
- chdir1 = 'relocate/src/subdir1'
- chdir2 = 'relocate/src/subdir2'
-else:
- chdir1 = chdir2 = 'relocate/src'
-
-test.run_built_executable('program1', chdir=chdir1, stdout=expect1)
-test.run_built_executable('program2', chdir=chdir2, stdout=expect2)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Build a .gyp that depends on 2 gyp files with the same name.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('all.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('all.gyp', chdir='relocate/src')
-
-expect1 = """\
-Hello from main1.cc
-"""
-
-expect2 = """\
-Hello from main2.cc
-"""
-
-if test.format == 'xcode':
- chdir1 = 'relocate/src/subdir1'
- chdir2 = 'relocate/src/subdir2'
-else:
- chdir1 = chdir2 = 'relocate/src'
-
-test.run_built_executable('program1', chdir=chdir1, stdout=expect1)
-test.run_built_executable('program2', chdir=chdir2, stdout=expect2)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a dependency on two gyp files with the same name do not create a
-uid collision in the resulting generated xcode file.
-"""
-
-import TestGyp
-
-import sys
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('test.gyp', chdir='library')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'one',
- 'type': 'static_library',
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'duplicate_names',
- 'type': 'shared_library',
- 'dependencies': [
- 'one/sub.gyp:one',
- 'two/sub.gyp:two',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'targets': [
- {
- 'target_name': 'two',
- 'type': 'static_library',
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'all_exes',
- 'type': 'none',
- 'dependencies': [
- 'subdir1/executable.gyp:*',
- 'subdir2/executable.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program1',
- 'type': 'executable',
- 'sources': [
- 'main1.cc',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-int main() {
- printf("Hello from main1.cc\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program2',
- 'type': 'executable',
- 'sources': [
- 'main2.cc',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-int main() {
- printf("Hello from main2.cc\n");
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Tests the use of rules with the same output file name.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('subdirs.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('subdirs.gyp', test.ALL, chdir='relocate/src')
-test.must_exist('relocate/src/subdir1/rule.txt')
-test.must_exist('relocate/src/subdir2/rule.txt')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'target1',
- 'type': 'none',
- 'sources': [
- '../touch.py'
- ],
- 'rules': [
- {
- 'rule_name': 'rule1',
- 'extension': 'py',
- 'inputs': [],
- 'outputs': [
- 'rule.txt',
- ],
- 'action': [
- 'python', '../touch.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'target2',
- 'type': 'none',
- 'sources': [
- '../touch.py'
- ],
- 'rules': [
- {
- 'rule_name': 'rule2',
- 'extension': 'py',
- 'inputs': [],
- 'outputs': [
- 'rule.txt',
- ],
- 'action': [
- 'python', '../touch.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'subdirs',
- 'type': 'none',
- 'dependencies': [
- 'subdir1/subdir1.gyp:*',
- 'subdir2/subdir2.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-f = open(sys.argv[1], 'w+')
-f.write('Hello from touch.py\n')
-f.close()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Build a .gyp with two targets that share a common .c source file.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('all.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('all.gyp', test.ALL, chdir='relocate/src')
-
-expect1 = """\
-Hello from prog1.c
-Hello prog1 from func.c
-"""
-
-expect2 = """\
-Hello from prog2.c
-Hello prog2 from func.c
-"""
-
-test.run_built_executable('prog1', chdir='relocate/src', stdout=expect1)
-test.run_built_executable('prog2', chdir='relocate/src', stdout=expect2)
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Build a .gyp with two targets that share a common .c source file.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('all.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('all.gyp', chdir='relocate/src')
-
-expect1 = """\
-Hello from prog1.c
-Hello prog1 from func.c
-"""
-
-expect2 = """\
-Hello from prog2.c
-Hello prog2 from func.c
-"""
-
-test.run_built_executable('prog1', chdir='relocate/src', stdout=expect1)
-test.run_built_executable('prog2', chdir='relocate/src', stdout=expect2)
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'prog1',
- 'type': 'executable',
- 'defines': [
- 'PROG="prog1"',
- ],
- 'sources': [
- 'prog1.c',
- 'func.c',
- ],
- },
- {
- 'target_name': 'prog2',
- 'type': 'executable',
- 'defines': [
- 'PROG="prog2"',
- ],
- 'sources': [
- 'prog2.c',
- 'func.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-void func(void)
-{
- printf("Hello %s from func.c\n", PROG);
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void func(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog1.c\n");
- func();
- /*
- * Uncomment to test same-named files in different directories,
- * which Visual Studio doesn't support.
- subdir1_func();
- subdir2_func();
- */
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-extern void func(void);
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog2.c\n");
- func();
- /*
- * Uncomment to test same-named files in different directories,
- * which Visual Studio doesn't support.
- subdir1_func();
- subdir2_func();
- */
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-void subdir1_func(void)
-{
- printf("Hello %s from subdir1/func.c\n", PROG);
-}
+++ /dev/null
-#include <stdio.h>
-
-void subdir2_func(void)
-{
- printf("Hello %s from subdir2/func.c\n", PROG);
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test cases when multiple targets in different directories have the same name.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['android', 'ninja', 'make'])
-
-test.run_gyp('subdirs.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-# Test that we build all targets.
-test.build('subdirs.gyp', 'target', chdir='relocate/src')
-test.must_exist('relocate/src/subdir1/action1.txt')
-test.must_exist('relocate/src/subdir2/action2.txt')
-
-# Test that we build all targets using the correct actions, even if they have
-# the same names.
-test.build('subdirs.gyp', 'target_same_action_name', chdir='relocate/src')
-test.must_exist('relocate/src/subdir1/action.txt')
-test.must_exist('relocate/src/subdir2/action.txt')
-
-# Test that we build all targets using the correct rules, even if they have
-# the same names.
-test.build('subdirs.gyp', 'target_same_rule_name', chdir='relocate/src')
-test.must_exist('relocate/src/subdir1/rule.txt')
-test.must_exist('relocate/src/subdir2/rule.txt')
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'target',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'action1',
- 'inputs': [],
- 'outputs': [
- 'action1.txt',
- ],
- 'action': [
- 'python', '../touch.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'target_same_action_name',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'action',
- 'inputs': [],
- 'outputs': [
- 'action.txt',
- ],
- 'action': [
- 'python', '../touch.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'target_same_rule_name',
- 'type': 'none',
- 'sources': [
- '../touch.py'
- ],
- 'rules': [
- {
- 'rule_name': 'rule',
- 'extension': 'py',
- 'inputs': [],
- 'outputs': [
- 'rule.txt',
- ],
- 'action': [
- 'python', '../touch.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'target',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'action2',
- 'inputs': [],
- 'outputs': [
- 'action2.txt',
- ],
- 'action': [
- 'python', '../touch.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'target_same_action_name',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'action',
- 'inputs': [],
- 'outputs': [
- 'action.txt',
- ],
- 'action': [
- 'python', '../touch.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- {
- 'target_name': 'target_same_rule_name',
- 'type': 'none',
- 'sources': [
- '../touch.py'
- ],
- 'rules': [
- {
- 'rule_name': 'rule',
- 'extension': 'py',
- 'inputs': [],
- 'outputs': [
- 'rule.txt',
- ],
- 'action': [
- 'python', '../touch.py', '<(_outputs)',
- ],
- # Allows the test to run without hermetic cygwin on windows.
- 'msvs_cygwin_shell': 0,
- },
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'subdirs',
- 'type': 'none',
- 'dependencies': [
- 'subdir1/subdir1.gyp:*',
- 'subdir2/subdir2.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-f = open(sys.argv[1], 'w+')
-f.write('Hello from touch.py\n')
-f.close()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Check that duplicate targets in a directory gives an error.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-# Require that gyp files with duplicate targets spit out an error.
-test.run_gyp('all.gyp', chdir='src', status=1, stderr=None)
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'all_exes',
- 'type': 'none',
- 'dependencies': [
- 'executable1.gyp:*',
- 'executable2.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'sources': [
- 'main1.cc',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'sources': [
- 'main2.cc',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure rule names with non-"normal" characters in them don't cause
-broken build files. This test was originally causing broken .ninja files.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-test.run_gyp('sanitize-rule-names.gyp')
-test.build('sanitize-rule-names.gyp', test.ALL)
-test.pass_test()
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 's_test',
- 'type': 'executable',
- 'rules': [
- {
- # Make sure this rule name doesn't cause an invalid ninja file.
- 'rule_name': 'rule name with odd characters ()/',
- 'extension': 'S',
- 'outputs': ['outfile'],
- 'msvs_cygwin_shell': 0,
- 'msvs_quote_cmd': 0,
- 'action': ['python', 'script.py', '<(RULE_INPUT_PATH)', 'outfile'],
- },
- ],
- 'sources': [
- 'blah.S',
- 'hello.cc',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import shutil
-import sys
-
-shutil.copyfile(*sys.argv[1:])
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a scons build picks up tools modules specified
-via 'scons_tools' in the 'scons_settings' dictionary.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('tools.gyp')
-
-test.build('tools.gyp', test.ALL)
-
-if test.format == 'scons':
- expect = "Hello, world!\n"
-else:
- expect = ""
-test.run_built_executable('tools', stdout=expect)
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# SCons "tool" module that simply sets a -D value.
-def generate(env):
- env['CPPDEFINES'] = ['THIS_TOOL']
-
-def exists(env):
- pass
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
-#ifdef THIS_TOOL
- printf("Hello, world!\n");
-#endif
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'tools',
- 'type': 'executable',
- 'sources': [
- 'tools.c',
- ],
- },
- ],
- 'scons_settings': {
- 'tools': ['default', 'this_tool'],
- },
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('build/all.gyp', chdir='src')
-
-test.build('build/all.gyp', test.ALL, chdir='src')
-
-chdir = 'src/build'
-
-# The top-level Makefile is in the directory where gyp was run.
-# TODO(mmoss) Should the Makefile go in the directory of the passed in .gyp
-# file? What about when passing in multiple .gyp files? Would sub-project
-# Makefiles (see http://codereview.chromium.org/340008 comments) solve this?
-if test.format in ('make', 'ninja'):
- chdir = 'src'
-
-if test.format == 'xcode':
- chdir = 'src/prog1'
-test.run_built_executable('program1',
- chdir=chdir,
- stdout="Hello from prog1.c\n")
-
-if test.format == 'xcode':
- chdir = 'src/prog2'
-test.run_built_executable('program2',
- chdir=chdir,
- stdout="Hello from prog2.c\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('build/all.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('build/all.gyp', test.ALL, chdir='relocate/src')
-
-chdir = 'relocate/src/build'
-
-# The top-level Makefile is in the directory where gyp was run.
-# TODO(mmoss) Should the Makefile go in the directory of the passed in .gyp
-# file? What about when passing in multiple .gyp files? Would sub-project
-# Makefiles (see http://codereview.chromium.org/340008 comments) solve this?
-if test.format in ('make', 'ninja'):
- chdir = 'relocate/src'
-
-if test.format == 'xcode':
- chdir = 'relocate/src/prog1'
-test.run_built_executable('program1',
- chdir=chdir,
- stdout="Hello from prog1.c\n")
-
-if test.format == 'xcode':
- chdir = 'relocate/src/prog2'
-test.run_built_executable('program2',
- chdir=chdir,
- stdout="Hello from prog2.c\n")
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- # TODO(sgk): a target name of 'all' leads to a scons dependency cycle
- 'target_name': 'All',
- 'type': 'none',
- 'dependencies': [
- '../prog1/prog1.gyp:*',
- '../prog2/prog2.gyp:*',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog1.c\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program1',
- 'type': 'executable',
- 'sources': [
- 'prog1.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog2.c\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'program2',
- 'type': 'executable',
- 'sources': [
- 'prog2.c',
- ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Runs small tests.
-"""
-
-import imp
-import os
-import sys
-import unittest
-
-import TestGyp
-
-
-test = TestGyp.TestGyp()
-
-# Add pylib to the import path (so tests can import their dependencies).
-# This is consistant with the path.append done in the top file "gyp".
-sys.path.append(os.path.join(test._cwd, 'pylib'))
-
-# Add new test suites here.
-files_to_test = [
- 'pylib/gyp/MSVSSettings_test.py',
- 'pylib/gyp/easy_xml_test.py',
- 'pylib/gyp/generator/msvs_test.py',
- 'pylib/gyp/generator/ninja_test.py',
- 'pylib/gyp/common_test.py',
-]
-
-# Collect all the suites from the above files.
-suites = []
-for filename in files_to_test:
- # Carve the module name out of the path.
- name = os.path.splitext(os.path.split(filename)[1])[0]
- # Find the complete module path.
- full_filename = os.path.join(test._cwd, filename)
- # Load the module.
- module = imp.load_source(name, full_filename)
- # Add it to the list of test suites.
- suites.append(unittest.defaultTestLoader.loadTestsFromModule(module))
-# Create combined suite.
-all_tests = unittest.TestSuite(suites)
-
-# Run all the tests.
-result = unittest.TextTestRunner(verbosity=2).run(all_tests)
-if result.failures or result.errors:
- test.fail_test()
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies build of a static_library with the standalone_static_library flag set.
-"""
-
-import os
-import subprocess
-import sys
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-# Verify that types other than static_library cause a failure.
-test.run_gyp('invalid.gyp', status=1, stderr=None)
-target_str = 'invalid.gyp:bad#target'
-if test.format == 'scons':
- target_str = os.path.join(os.path.realpath(os.curdir), target_str)
-err = ['gyp: Target %s has type executable but standalone_static_library flag '
- 'is only valid for static_library type.' % target_str]
-test.must_contain_all_lines(test.stderr(), err)
-
-# Build a valid standalone_static_library.
-test.run_gyp('mylib.gyp')
-test.build('mylib.gyp', target='prog')
-
-# Verify that the static library is copied to the correct location.
-if test.format == 'scons':
- # For scons, we expect the library to be copied to the shared lib dir.
- standalone_static_library_dir = test.SHARED_LIB
-else:
- # Otherwise, we expect the library to be copied to $PRODUCT_DIR.
- standalone_static_library_dir = test.EXECUTABLE
-path_to_lib = os.path.split(
- test.built_file_path('mylib', type=standalone_static_library_dir))[0]
-lib_name = test.built_file_basename('mylib', type=test.STATIC_LIB)
-path = os.path.join(path_to_lib, lib_name)
-test.must_exist(path)
-
-# Verify that the program runs properly.
-expect = 'hello from mylib.c\n'
-test.run_built_executable('prog', stdout=expect)
-
-# Verify that libmylib.a contains symbols. "ar -x" fails on a 'thin' archive.
-if test.format in ('make', 'ninja') and sys.platform.startswith('linux'):
- retcode = subprocess.call(['ar', '-x', path])
- assert retcode == 0
-
-test.pass_test()
\ No newline at end of file
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'bad',
- 'type': 'executable',
- 'standalone_static_library': 1,
- 'sources': [
- 'prog.c',
- ],
- },
- ],
-}
\ No newline at end of file
+++ /dev/null
-#include <stdio.h>
-
-void print(void)
-{
- printf("hello from mylib.c\n");
- return;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'mylib',
- 'type': 'static_library',
- 'standalone_static_library': 1,
- 'sources': [
- 'mylib.c',
- ],
- },
- {
- 'target_name': 'prog',
- 'type': 'executable',
- 'sources': [
- 'prog.c',
- ],
- 'dependencies': [
- 'mylib',
- ],
- },
- ],
-}
+++ /dev/null
-extern void print(void);
-
-int main(int argc, char *argv[])
-{
- print();
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that a project hierarchy created with the --generator-output=
-option can be built even when it's relocated to a different path.
-"""
-
-import TestGyp
-import os
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('standalone.gyp', '-Gstandalone')
-
-# Look at all the files in the tree to make sure none
-# of them reference the gyp file.
-for root, dirs, files in os.walk("."):
- for file in files:
- # ignore ourself
- if os.path.splitext(__file__)[0] in file:
- continue
- file = os.path.join(root, file)
- contents = open(file).read()
- if 'standalone.gyp' in contents:
- print 'gyp file referenced in generated output: %s' % file
- test.fail_test()
-
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name' : 'foo',
- 'type' : 'executable'
- },
- ]
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a target and a subsidiary dependent target from a
-.gyp file in a subdirectory, without specifying an explicit output build
-directory, and using the generated solution or project file at the top
-of the tree as the entry point.
-
-The configuration sets the Xcode SYMROOT variable and uses --depth=
-to make Xcode behave like the other build tools--that is, put all
-built targets in a single output build directory at the top of the tree.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('prog1.gyp', '-Dset_symroot=1', '--depth=.', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-# Suppress the test infrastructure's setting SYMROOT on the command line.
-test.build('prog1.gyp', test.ALL, SYMROOT=None, chdir='relocate/src')
-
-test.run_built_executable('prog1',
- stdout="Hello from prog1.c\n",
- chdir='relocate/src')
-test.run_built_executable('prog2',
- stdout="Hello from prog2.c\n",
- chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a target and a subsidiary dependent target from a
-.gyp file in a subdirectory, without specifying an explicit output build
-directory, and using the generated solution or project file at the top
-of the tree as the entry point.
-
-The configuration sets the Xcode SYMROOT variable and uses --depth=
-to make Xcode behave like the other build tools--that is, put all
-built targets in a single output build directory at the top of the tree.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('prog1.gyp', '-Dset_symroot=1', '--depth=.', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-# Suppress the test infrastructure's setting SYMROOT on the command line.
-test.build('prog1.gyp', SYMROOT=None, chdir='relocate/src')
-
-test.run_built_executable('prog1',
- stdout="Hello from prog1.c\n",
- chdir='relocate/src')
-
-test.run_built_executable('prog2',
- stdout="Hello from prog2.c\n",
- chdir='relocate/src')
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a subsidiary dependent target from a .gyp file in a
-subdirectory, without specifying an explicit output build directory,
-and using the subdirectory's solution or project file as the entry point.
-"""
-
-import TestGyp
-
-# Ninja and Android don't support running from subdirectories.
-test = TestGyp.TestGyp(formats=['!ninja', '!android'])
-
-test.run_gyp('prog1.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-chdir = 'relocate/src/subdir'
-target = test.ALL
-
-test.build('prog2.gyp', target, chdir=chdir)
-
-test.built_file_must_not_exist('prog1', type=test.EXECUTABLE, chdir=chdir)
-
-test.run_built_executable('prog2',
- chdir=chdir,
- stdout="Hello from prog2.c\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a subsidiary dependent target from a .gyp file in a
-subdirectory, without specifying an explicit output build directory,
-and using the subdirectory's solution or project file as the entry point.
-"""
-
-import TestGyp
-import errno
-
-# Ninja and Android don't support running from subdirectories.
-test = TestGyp.TestGyp(formats=['!ninja', '!android'])
-
-test.run_gyp('prog1.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-chdir = 'relocate/src/subdir'
-
-test.build('prog2.gyp', chdir=chdir)
-
-test.built_file_must_not_exist('prog1', type=test.EXECUTABLE, chdir=chdir)
-
-test.run_built_executable('prog2',
- chdir=chdir,
- stdout="Hello from prog2.c\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a project rooted several layers under src_dir works.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('prog3.gyp', chdir='src/subdir/subdir2')
-
-test.relocate('src', 'relocate/src')
-
-test.build('prog3.gyp', test.ALL, chdir='relocate/src/subdir/subdir2')
-
-test.run_built_executable('prog3',
- chdir='relocate/src/subdir/subdir2',
- stdout="Hello from prog3.c\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a target and a subsidiary dependent target from a
-.gyp file in a subdirectory, without specifying an explicit output build
-directory, and using the generated solution or project file at the top
-of the tree as the entry point.
-
-There is a difference here in the default behavior of the underlying
-build tools. Specifically, when building the entire "solution", Xcode
-puts the output of each project relative to the .xcodeproj directory,
-while Visual Studio (and our implementations of SCons and Make) put it
-in a build directory relative to the "solution"--that is, the entry-point
-from which you built the entire tree.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('prog1.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('prog1.gyp', test.ALL, chdir='relocate/src')
-
-test.run_built_executable('prog1',
- stdout="Hello from prog1.c\n",
- chdir='relocate/src')
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('prog2',
- chdir=chdir,
- stdout="Hello from prog2.c\n")
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a target and a subsidiary dependent target from a
-.gyp file in a subdirectory, without specifying an explicit output build
-directory, and using the generated solution or project file at the top
-of the tree as the entry point.
-
-There is a difference here in the default behavior of the underlying
-build tools. Specifically, when building the entire "solution", Xcode
-puts the output of each project relative to the .xcodeproj directory,
-while Visual Studio (and our implementations of SCons and Make) put it
-in a build directory relative to the "solution"--that is, the entry-point
-from which you built the entire tree.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('prog1.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('prog1.gyp', chdir='relocate/src')
-
-test.run_built_executable('prog1',
- stdout="Hello from prog1.c\n",
- chdir='relocate/src')
-
-if test.format == 'xcode':
- chdir = 'relocate/src/subdir'
-else:
- chdir = 'relocate/src'
-test.run_built_executable('prog2',
- chdir=chdir,
- stdout="Hello from prog2.c\n")
-
-test.pass_test()
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog1.c\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- 'symroot.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog1',
- 'type': 'executable',
- 'dependencies': [
- 'subdir/prog2.gyp:prog2',
- ],
- 'sources': [
- 'prog1.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog2.c\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../symroot.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog2',
- 'type': 'executable',
- 'sources': [
- 'prog2.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog3.c\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'includes': [
- '../../symroot.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'prog3',
- 'type': 'executable',
- 'sources': [
- 'prog3.c',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'set_symroot%': 0,
- },
- 'conditions': [
- ['set_symroot == 1', {
- 'xcode_settings': {
- 'SYMROOT': '<(DEPTH)/build',
- },
- }],
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that toolsets are correctly applied
-"""
-
-import TestGyp
-
-# Multiple toolsets are currently only supported by the make generator.
-test = TestGyp.TestGyp(formats=['make'])
-
-test.run_gyp('toolsets.gyp')
-
-test.build('toolsets.gyp', test.ALL)
-
-test.run_built_executable('host-main', stdout="Host\n")
-test.run_built_executable('target-main', stdout="Target\n")
-
-test.pass_test()
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-#include <stdio.h>
-
-const char *GetToolset();
-
-int main(int argc, char *argv[]) {
- printf("%s\n", GetToolset());
-}
+++ /dev/null
-/* Copyright (c) 2009 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-const char *GetToolset() {
-#ifdef TARGET
- return "Target";
-#else
- return "Host";
-#endif
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'target_conditions': [
- ['_toolset=="target"', {'defines': ['TARGET']}]
- ]
- },
- 'targets': [
- {
- 'target_name': 'toolsets',
- 'type': 'static_library',
- 'toolsets': ['target', 'host'],
- 'sources': [
- 'toolsets.cc',
- ],
- },
- {
- 'target_name': 'host-main',
- 'type': 'executable',
- 'toolsets': ['host'],
- 'dependencies': ['toolsets'],
- 'sources': [
- 'main.cc',
- ],
- },
- {
- 'target_name': 'target-main',
- 'type': 'executable',
- 'dependencies': ['toolsets'],
- 'sources': [
- 'main.cc',
- ],
- },
- # This tests that build systems can handle a shared library being build for
- # both host and target.
- {
- 'target_name': 'janus',
- 'type': 'shared_library',
- 'toolsets': ['target', 'host'],
- 'sources': [
- 'toolsets.cc',
- ],
- 'cflags': [ '-fPIC' ],
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies building a subsidiary dependent target from a .gyp file in a
-subdirectory, without specifying an explicit output build directory,
-and using the subdirectory's solution or project file as the entry point.
-"""
-
-import TestGyp
-import errno
-
-test = TestGyp.TestGyp(formats=['ninja', 'make'])
-
-# We want our Makefile to be one dir up from main.gyp.
-test.run_gyp('main.gyp', '--toplevel-dir=..', chdir='src/sub1')
-
-toplevel_dir = 'src'
-
-test.build('all', chdir=toplevel_dir)
-
-test.built_file_must_exist('prog1', type=test.EXECUTABLE, chdir=toplevel_dir)
-
-test.run_built_executable('prog1',
- chdir=toplevel_dir,
- stdout="Hello from prog1.c\n")
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'prog1',
- 'type': 'executable',
- 'dependencies': [
- '<(DEPTH)/../sub2/prog2.gyp:prog2',
- ],
- 'sources': [
- 'prog1.c',
- ],
- },
- ],
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog1.c\n");
- return 0;
-}
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
- printf("Hello from prog2.c\n");
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'prog2',
- 'type': 'executable',
- 'sources': [
- 'prog2.c',
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This is a simple test file to make sure that variable substitution
-# happens correctly. Run "run_tests.py" using python to generate the
-# output from this gyp file.
-
-{
- 'variables': {
- 'pi': 'import math; print math.pi',
- 'third_letters': "<(other_letters)HIJK",
- 'letters_list': 'ABCD',
- 'other_letters': '<(letters_list)EFG',
- 'check_included': '<(included_variable)',
- 'check_lists': [
- '<(included_variable)',
- '<(third_letters)',
- ],
- 'check_int': 5,
- 'check_str_int': '6',
- 'check_list_int': [
- 7,
- '8',
- 9,
- ],
- 'not_int_1': ' 10',
- 'not_int_2': '11 ',
- 'not_int_3': '012',
- 'not_int_4': '13.0',
- 'not_int_5': '+14',
- 'negative_int': '-15',
- 'zero_int': '0',
- },
- 'includes': [
- 'commands.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'foo',
- 'type': 'none',
- 'variables': {
- 'var1': '<!(["python", "-c", "<(pi)"])',
- 'var2': '<!(python -c "print \'<!(python -c "<(pi)") <(letters_list)\'")',
- 'var3': '<!(python -c "print \'<(letters_list)\'")',
- 'var4': '<(<!(python -c "print \'letters_list\'"))',
- 'var5': 'letters_',
- 'var6': 'list',
- 'var7': '<(check_int)',
- 'var8': '<(check_int)blah',
- 'var9': '<(check_str_int)',
- 'var10': '<(check_list_int)',
- 'var11': ['<@(check_list_int)'],
- 'var12': '<(not_int_1)',
- 'var13': '<(not_int_2)',
- 'var14': '<(not_int_3)',
- 'var15': '<(not_int_4)',
- 'var16': '<(not_int_5)',
- 'var17': '<(negative_int)',
- 'var18': '<(zero_int)',
- # A second set with different names to make sure they only execute the
- # commands once.
- 'var1prime': '<!(["python", "-c", "<(pi)"])',
- 'var2prime': '<!(python -c "print \'<!(python -c "<(pi)") <(letters_list)\'")',
- 'var3prime': '<!(python -c "print \'<(letters_list)\'")',
- 'var4prime': '<(<!(python -c "print \'letters_list\'"))',
- },
- 'actions': [
- {
- 'action_name': 'test_action',
- 'variables': {
- 'var7': '<!(echo <(var5)<(var6))',
- },
- 'inputs' : [
- '<(var2)',
- ],
- 'outputs': [
- '<(var4)',
- '<(var7)',
- ],
- 'action': [
- 'echo',
- '<(_inputs)',
- '<(_outputs)',
- ],
- },
- # Again with the same vars to make sure the right things happened.
- {
- 'action_name': 'test_action_prime',
- 'variables': {
- 'var7': '<!(echo <(var5)<(var6))',
- },
- 'inputs' : [
- '<(var2)',
- ],
- 'outputs': [
- '<(var4)',
- '<(var7)',
- ],
- 'action': [
- 'echo',
- '<(_inputs)',
- '<(_outputs)',
- ],
- },
- # And one more time with the other vars...
- {
- 'action_name': 'test_action_prime_prime',
- 'variables': {
- 'var7': '<!(echo <(var5)<(var6))',
- },
- 'inputs' : [
- '<(var2prime)',
- ],
- 'outputs': [
- '<(var4prime)',
- '<(var7)',
- ],
- 'action': [
- 'echo',
- '<(_inputs)',
- '<(_outputs)',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFG', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'XYZ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'XYZ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'third_letters', 'is_array': '', 'replace': '<(third_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(other_letters)HIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'<!(python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "print \'<!(python -c "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "import math; print math.pi"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "import math; print math.pi"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "print \'3.14159265359 ABCD\'"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print '3.14159265359 ABCD'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '"python", "-c", "<(pi', 'is_array': '[', 'replace': '<!(["python", "-c", "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '["python", "-c", "import math; print math.pi"]', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command '['python', '-c', 'import math; print math.pi']' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '<!(python -c "print \'letters_list\'"', 'is_array': '', 'replace': '<(<!(python -c "print \'letters_list\'")', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'letters_list\'"', 'is_array': '', 'replace': '<!(python -c "print \'letters_list\'")', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print 'letters_list'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '5', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '"python", "-c", "<(pi', 'is_array': '[', 'replace': '<!(["python", "-c", "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '["python", "-c", "import math; print math.pi"]', recursing.
-VARIABLES:input.py:721:ExpandVariables Had cache value for command '['python', '-c', 'import math; print math.pi']' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'<(letters_list', 'is_array': '', 'replace': '<!(python -c "print \'<(letters_list)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "print \'ABCD\'"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print 'ABCD'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'<!(python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "print \'<!(python -c "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "import math; print math.pi"', recursing.
-VARIABLES:input.py:721:ExpandVariables Had cache value for command 'python -c "import math; print math.pi"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "print \'3.14159265359 ABCD\'"', recursing.
-VARIABLES:input.py:721:ExpandVariables Had cache value for command 'python -c "print '3.14159265359 ABCD'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_str_int', 'is_array': '', 'replace': '<(check_str_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '6', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '5blah', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '<!(python -c "print \'letters_list\'"', 'is_array': '', 'replace': '<(<!(python -c "print \'letters_list\'")', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'letters_list\'"', 'is_array': '', 'replace': '<!(python -c "print \'letters_list\'")', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:721:ExpandVariables Had cache value for command 'python -c "print 'letters_list'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'<(letters_list', 'is_array': '', 'replace': '<!(python -c "print \'<(letters_list)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "print \'ABCD\'"', recursing.
-VARIABLES:input.py:721:ExpandVariables Had cache value for command 'python -c "print 'ABCD'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_4', 'is_array': '', 'replace': '<(not_int_4)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '13.0', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_3', 'is_array': '', 'replace': '<(not_int_3)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '012', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'negative_int', 'is_array': '', 'replace': '<(negative_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '-15', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_5', 'is_array': '', 'replace': '<(not_int_5)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '+14', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<(check_list_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '7 8 9', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_2', 'is_array': '', 'replace': '<(not_int_2)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '11 ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_1', 'is_array': '', 'replace': '<(not_int_1)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output ' 10', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'zero_int', 'is_array': '', 'replace': '<(zero_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '0', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<@(check_list_int)', 'type': '<@', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output [7, 8, 9], recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var6', 'is_array': '', 'replace': '<(var6)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'echo <(var5', 'is_array': '', 'replace': '<!(echo <(var5)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var5', 'is_array': '', 'replace': '<(var5)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'echo letters_list', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'echo letters_list' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_inputs', 'is_array': '', 'replace': '<(_inputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var2', 'is_array': '', 'replace': '<(var2)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output '"3.14159265359 ABCD"', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_outputs', 'is_array': '', 'replace': '<(_outputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var4', 'is_array': '', 'replace': '<(var4)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var7', 'is_array': '', 'replace': '<(var7)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD letters_list', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var6', 'is_array': '', 'replace': '<(var6)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'echo <(var5', 'is_array': '', 'replace': '<!(echo <(var5)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var5', 'is_array': '', 'replace': '<(var5)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'echo letters_list', recursing.
-VARIABLES:input.py:721:ExpandVariables Had cache value for command 'echo letters_list' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_inputs', 'is_array': '', 'replace': '<(_inputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var2', 'is_array': '', 'replace': '<(var2)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output '"3.14159265359 ABCD"', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_outputs', 'is_array': '', 'replace': '<(_outputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var4', 'is_array': '', 'replace': '<(var4)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var7', 'is_array': '', 'replace': '<(var7)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD letters_list', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var6', 'is_array': '', 'replace': '<(var6)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'echo <(var5', 'is_array': '', 'replace': '<!(echo <(var5)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var5', 'is_array': '', 'replace': '<(var5)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'echo letters_list', recursing.
-VARIABLES:input.py:721:ExpandVariables Had cache value for command 'echo letters_list' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_inputs', 'is_array': '', 'replace': '<(_inputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var2prime', 'is_array': '', 'replace': '<(var2prime)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output '"3.14159265359 ABCD"', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_outputs', 'is_array': '', 'replace': '<(_outputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var4prime', 'is_array': '', 'replace': '<(var4prime)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var7', 'is_array': '', 'replace': '<(var7)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD letters_list', recursing.
+++ /dev/null
-{'_DEPTH': '.',
- 'included_files': ['commands-repeated.gyp', 'commands.gypi'],
- 'targets': [{'actions': [{'action': ['echo',
- '"3.14159265359 ABCD"',
- 'ABCD letters_list'],
- 'action_name': 'test_action',
- 'inputs': ['3.14159265359 ABCD'],
- 'outputs': ['ABCD', 'letters_list'],
- 'variables': {'var7': 'letters_list'}},
- {'action': ['echo',
- '"3.14159265359 ABCD"',
- 'ABCD letters_list'],
- 'action_name': 'test_action_prime',
- 'inputs': ['3.14159265359 ABCD'],
- 'outputs': ['ABCD', 'letters_list'],
- 'variables': {'var7': 'letters_list'}},
- {'action': ['echo',
- '"3.14159265359 ABCD"',
- 'ABCD letters_list'],
- 'action_name': 'test_action_prime_prime',
- 'inputs': ['3.14159265359 ABCD'],
- 'outputs': ['ABCD', 'letters_list'],
- 'variables': {'var7': 'letters_list'}}],
- 'configurations': {'Default': {}},
- 'default_configuration': 'Default',
- 'target_name': 'foo',
- 'toolset': 'target',
- 'type': 'none',
- 'variables': {'var1': '3.14159265359',
- 'var10': '7 8 9',
- 'var11': ['7', '8', '9'],
- 'var12': ' 10',
- 'var13': '11 ',
- 'var14': '012',
- 'var15': '13.0',
- 'var16': '+14',
- 'var17': '-15',
- 'var18': '0',
- 'var1prime': '3.14159265359',
- 'var2': '3.14159265359 ABCD',
- 'var2prime': '3.14159265359 ABCD',
- 'var3': 'ABCD',
- 'var3prime': 'ABCD',
- 'var4': 'ABCD',
- 'var4prime': 'ABCD',
- 'var5': 'letters_',
- 'var6': 'list',
- 'var7': '5',
- 'var8': '5blah',
- 'var9': '6'}},
- {'configurations': {'Default': {}},
- 'default_configuration': 'Default',
- 'target_name': 'dummy',
- 'toolset': 'target',
- 'type': 'none'}],
- 'variables': {'check_included': 'XYZ',
- 'check_int': '5',
- 'check_list_int': ['7', '8', '9'],
- 'check_lists': ['XYZ', 'ABCDEFGHIJK'],
- 'check_str_int': '6',
- 'included_variable': 'XYZ',
- 'letters_list': 'ABCD',
- 'negative_int': '-15',
- 'not_int_1': ' 10',
- 'not_int_2': '11 ',
- 'not_int_3': '012',
- 'not_int_4': '13.0',
- 'not_int_5': '+14',
- 'other_letters': 'ABCDEFG',
- 'pi': 'import math; print math.pi',
- 'third_letters': 'ABCDEFGHIJK',
- 'zero_int': '0'}}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This is a simple test file to make sure that variable substitution
-# happens correctly. Run "run_tests.py" using python to generate the
-# output from this gyp file.
-
-{
- 'variables': {
- 'pi': 'import math; print math.pi',
- 'third_letters': "<(other_letters)HIJK",
- 'letters_list': 'ABCD',
- 'other_letters': '<(letters_list)EFG',
- 'check_included': '<(included_variable)',
- 'check_lists': [
- '<(included_variable)',
- '<(third_letters)',
- ],
- 'check_int': 5,
- 'check_str_int': '6',
- 'check_list_int': [
- 7,
- '8',
- 9,
- ],
- 'not_int_1': ' 10',
- 'not_int_2': '11 ',
- 'not_int_3': '012',
- 'not_int_4': '13.0',
- 'not_int_5': '+14',
- 'negative_int': '-15',
- 'zero_int': '0',
- },
- 'includes': [
- 'commands.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'foo',
- 'type': 'none',
- 'variables': {
- 'var1': '<!(["python", "-c", "<(pi)"])',
- 'var2': '<!(python -c "print \'<!(python -c "<(pi)") <(letters_list)\'")',
- 'var3': '<!(python -c "print \'<(letters_list)\'")',
- 'var4': '<(<!(python -c "print \'letters_list\'"))',
- 'var5': 'letters_',
- 'var6': 'list',
- 'var7': '<(check_int)',
- 'var8': '<(check_int)blah',
- 'var9': '<(check_str_int)',
- 'var10': '<(check_list_int)',
- 'var11': ['<@(check_list_int)'],
- 'var12': '<(not_int_1)',
- 'var13': '<(not_int_2)',
- 'var14': '<(not_int_3)',
- 'var15': '<(not_int_4)',
- 'var16': '<(not_int_5)',
- 'var17': '<(negative_int)',
- 'var18': '<(zero_int)',
- 'var19': ['<!@(python test.py)'],
- 'var20': '<!(python test.py)',
- },
- 'actions': [
- {
- 'action_name': 'test_action',
- 'variables': {
- 'var7': '<!(echo <(var5)<(var6))',
- },
- 'inputs' : [
- '<(var2)',
- ],
- 'outputs': [
- '<(var4)',
- '<(var7)',
- ],
- 'action': [
- 'echo',
- '<(_inputs)',
- '<(_outputs)',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFG', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'XYZ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'XYZ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'third_letters', 'is_array': '', 'replace': '<(third_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(other_letters)HIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '<!(python -c "print \'letters_list\'"', 'is_array': '', 'replace': '<(<!(python -c "print \'letters_list\'")', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'letters_list\'"', 'is_array': '', 'replace': '<!(python -c "print \'letters_list\'")', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print 'letters_list'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '5', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '"python", "-c", "<(pi', 'is_array': '[', 'replace': '<!(["python", "-c", "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '["python", "-c", "import math; print math.pi"]', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command '['python', '-c', 'import math; print math.pi']' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'<(letters_list', 'is_array': '', 'replace': '<!(python -c "print \'<(letters_list)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "print \'ABCD\'"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print 'ABCD'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'<!(python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "print \'<!(python -c "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "import math; print math.pi"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "import math; print math.pi"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "print \'3.14159265359 ABCD\'"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print '3.14159265359 ABCD'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python test.py', 'is_array': '', 'replace': '<!(python test.py)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:676:ExpandVariables Executing command 'python test.py' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'sample\\path\\foo.cpp', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_str_int', 'is_array': '', 'replace': '<(check_str_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '6', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '5blah', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_4', 'is_array': '', 'replace': '<(not_int_4)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '13.0', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_3', 'is_array': '', 'replace': '<(not_int_3)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '012', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'negative_int', 'is_array': '', 'replace': '<(negative_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '-15', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_5', 'is_array': '', 'replace': '<(not_int_5)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '+14', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<(check_list_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '7 8 9', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_2', 'is_array': '', 'replace': '<(not_int_2)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '11 ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_1', 'is_array': '', 'replace': '<(not_int_1)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output ' 10', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'zero_int', 'is_array': '', 'replace': '<(zero_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '0', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<@(check_list_int)', 'type': '<@', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output [7, 8, 9], recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python test.py', 'is_array': '', 'replace': '<!@(python test.py)', 'type': '<!@', 'command_string': None}
-VARIABLES:input.py:721:ExpandVariables Had cache value for command 'python test.py' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output ['samplepathfoo.cpp'], recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var6', 'is_array': '', 'replace': '<(var6)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'echo <(var5', 'is_array': '', 'replace': '<!(echo <(var5)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var5', 'is_array': '', 'replace': '<(var5)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'echo letters_list', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'echo letters_list' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_inputs', 'is_array': '', 'replace': '<(_inputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var2', 'is_array': '', 'replace': '<(var2)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output '"3.14159265359 ABCD"', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_outputs', 'is_array': '', 'replace': '<(_outputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var4', 'is_array': '', 'replace': '<(var4)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var7', 'is_array': '', 'replace': '<(var7)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD letters_list', recursing.
+++ /dev/null
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFG', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'XYZ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'included_variable', 'is_array': '', 'replace': '<(included_variable)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'XYZ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'third_letters', 'is_array': '', 'replace': '<(third_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(other_letters)HIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'other_letters', 'is_array': '', 'replace': '<(other_letters)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '<(letters_list)EFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCDEFGHIJK', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '<!(python -c "print \'letters_list\'"', 'is_array': '', 'replace': '<(<!(python -c "print \'letters_list\'")', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'letters_list\'"', 'is_array': '', 'replace': '<!(python -c "print \'letters_list\'")', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print 'letters_list'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '5', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '"python", "-c", "<(pi', 'is_array': '[', 'replace': '<!(["python", "-c", "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '["python", "-c", "import math; print math.pi"]', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command '['python', '-c', 'import math; print math.pi']' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'<(letters_list', 'is_array': '', 'replace': '<!(python -c "print \'<(letters_list)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "print \'ABCD\'"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print 'ABCD'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'letters_list', 'is_array': '', 'replace': '<(letters_list)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "print \'<!(python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "print \'<!(python -c "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python -c "<(pi', 'is_array': '', 'replace': '<!(python -c "<(pi)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'pi', 'is_array': '', 'replace': '<(pi)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "import math; print math.pi"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "import math; print math.pi"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'python -c "print \'3.14159265359 ABCD\'"', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'python -c "print '3.14159265359 ABCD'"' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python test.py', 'is_array': '', 'replace': '<!(python test.py)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:676:ExpandVariables Executing command 'python test.py' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'sample\\path\\foo.cpp', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_str_int', 'is_array': '', 'replace': '<(check_str_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '6', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_int', 'is_array': '', 'replace': '<(check_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '5blah', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_4', 'is_array': '', 'replace': '<(not_int_4)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '13.0', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_3', 'is_array': '', 'replace': '<(not_int_3)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '012', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'negative_int', 'is_array': '', 'replace': '<(negative_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '-15', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_5', 'is_array': '', 'replace': '<(not_int_5)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '+14', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<(check_list_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '7 8 9', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_2', 'is_array': '', 'replace': '<(not_int_2)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '11 ', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'not_int_1', 'is_array': '', 'replace': '<(not_int_1)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output ' 10', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'zero_int', 'is_array': '', 'replace': '<(zero_int)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '0', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'check_list_int', 'is_array': '', 'replace': '<@(check_list_int)', 'type': '<@', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output [7, 8, 9], recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'python test.py', 'is_array': '', 'replace': '<!@(python test.py)', 'type': '<!@', 'command_string': None}
-VARIABLES:input.py:721:ExpandVariables Had cache value for command 'python test.py' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output ['samplepathfoo.cpp'], recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var6', 'is_array': '', 'replace': '<(var6)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'echo <(var5', 'is_array': '', 'replace': '<!(echo <(var5)', 'type': '<!', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var5', 'is_array': '', 'replace': '<(var5)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'echo letters_list', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'echo letters_list' in directory 'None'
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_inputs', 'is_array': '', 'replace': '<(_inputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var2', 'is_array': '', 'replace': '<(var2)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output '3.14159265359 ABCD', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output '"3.14159265359 ABCD"', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_outputs', 'is_array': '', 'replace': '<(_outputs)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var4', 'is_array': '', 'replace': '<(var4)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'var7', 'is_array': '', 'replace': '<(var7)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'letters_list', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'ABCD letters_list', recursing.
+++ /dev/null
-{'_DEPTH': '.',
- 'included_files': ['commands.gyp', 'commands.gypi'],
- 'targets': [{'actions': [{'action': ['echo',
- '"3.14159265359 ABCD"',
- 'ABCD letters_list'],
- 'action_name': 'test_action',
- 'inputs': ['3.14159265359 ABCD'],
- 'outputs': ['ABCD', 'letters_list'],
- 'variables': {'var7': 'letters_list'}}],
- 'configurations': {'Default': {}},
- 'default_configuration': 'Default',
- 'target_name': 'foo',
- 'toolset': 'target',
- 'type': 'none',
- 'variables': {'var1': '3.14159265359',
- 'var10': '7 8 9',
- 'var11': ['7', '8', '9'],
- 'var12': ' 10',
- 'var13': '11 ',
- 'var14': '012',
- 'var15': '13.0',
- 'var16': '+14',
- 'var17': '-15',
- 'var18': '0',
- 'var19': ['samplepathfoo.cpp'],
- 'var2': '3.14159265359 ABCD',
- 'var20': 'sample\\path\\foo.cpp',
- 'var3': 'ABCD',
- 'var4': 'ABCD',
- 'var5': 'letters_',
- 'var6': 'list',
- 'var7': '5',
- 'var8': '5blah',
- 'var9': '6'}},
- {'configurations': {'Default': {}},
- 'default_configuration': 'Default',
- 'target_name': 'dummy',
- 'toolset': 'target',
- 'type': 'none'}],
- 'variables': {'check_included': 'XYZ',
- 'check_int': '5',
- 'check_list_int': ['7', '8', '9'],
- 'check_lists': ['XYZ', 'ABCDEFGHIJK'],
- 'check_str_int': '6',
- 'included_variable': 'XYZ',
- 'letters_list': 'ABCD',
- 'negative_int': '-15',
- 'not_int_1': ' 10',
- 'not_int_2': '11 ',
- 'not_int_3': '012',
- 'not_int_4': '13.0',
- 'not_int_5': '+14',
- 'other_letters': 'ABCDEFG',
- 'pi': 'import math; print math.pi',
- 'third_letters': 'ABCDEFGHIJK',
- 'zero_int': '0'}}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This file is included from commands.gyp to test evaluation order of includes.
-{
- 'variables': {
- 'included_variable': 'XYZ',
- },
- 'targets': [
- {
- 'target_name': 'dummy',
- 'type': 'none',
- },
- ],
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test that environment variables are ignored when --ignore-environment is
-specified.
-"""
-
-import os
-
-import TestGyp
-
-test = TestGyp.TestGyp(format='gypd')
-
-os.environ['GYP_DEFINES'] = 'FOO=BAR'
-os.environ['GYP_GENERATORS'] = 'foo'
-os.environ['GYP_GENERATOR_FLAGS'] = 'genflag=foo'
-os.environ['GYP_GENERATOR_OUTPUT'] = 'somedir'
-
-expect = test.read('commands.gyp.ignore-env.stdout').replace('\r\n', '\n')
-
-test.run_gyp('commands.gyp',
- '--debug', 'variables',
- '--ignore-environment',
- stdout=expect, ignore_line_numbers=True)
-
-# Verify the commands.gypd against the checked-in expected contents.
-#
-# Normally, we should canonicalize line endings in the expected
-# contents file setting the Subversion svn:eol-style to native,
-# but that would still fail if multiple systems are sharing a single
-# workspace on a network-mounted file system. Consequently, we
-# massage the Windows line endings ('\r\n') in the output to the
-# checked-in UNIX endings ('\n').
-
-contents = test.read('commands.gypd').replace('\r', '')
-expect = test.read('commands.gypd.golden').replace('\r', '')
-if not test.match(contents, expect):
- print "Unexpected contents of `commands.gypd'"
- test.diff(expect, contents, 'commands.gypd ')
- test.fail_test()
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test variable expansion of '<!()' syntax commands where they are evaluated
-more then once..
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(format='gypd')
-
-expect = test.read('commands-repeated.gyp.stdout').replace('\r\n', '\n')
-
-test.run_gyp('commands-repeated.gyp',
- '--debug', 'variables',
- stdout=expect, ignore_line_numbers=True)
-
-# Verify the commands-repeated.gypd against the checked-in expected contents.
-#
-# Normally, we should canonicalize line endings in the expected
-# contents file setting the Subversion svn:eol-style to native,
-# but that would still fail if multiple systems are sharing a single
-# workspace on a network-mounted file system. Consequently, we
-# massage the Windows line endings ('\r\n') in the output to the
-# checked-in UNIX endings ('\n').
-
-contents = test.read('commands-repeated.gypd').replace('\r\n', '\n')
-expect = test.read('commands-repeated.gypd.golden').replace('\r\n', '\n')
-if not test.match(contents, expect):
- print "Unexpected contents of `commands-repeated.gypd'"
- test.diff(expect, contents, 'commands-repeated.gypd ')
- test.fail_test()
-
-test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test variable expansion of '<!()' syntax commands.
-"""
-
-import os
-
-import TestGyp
-
-test = TestGyp.TestGyp(format='gypd')
-
-expect = test.read('commands.gyp.stdout').replace('\r', '')
-
-test.run_gyp('commands.gyp',
- '--debug', 'variables',
- stdout=expect, ignore_line_numbers=True)
-
-# Verify the commands.gypd against the checked-in expected contents.
-#
-# Normally, we should canonicalize line endings in the expected
-# contents file setting the Subversion svn:eol-style to native,
-# but that would still fail if multiple systems are sharing a single
-# workspace on a network-mounted file system. Consequently, we
-# massage the Windows line endings ('\r\n') in the output to the
-# checked-in UNIX endings ('\n').
-
-contents = test.read('commands.gypd').replace('\r', '')
-expect = test.read('commands.gypd.golden').replace('\r', '')
-if not test.match(contents, expect):
- print "Unexpected contents of `commands.gypd'"
- test.diff(expect, contents, 'commands.gypd ')
- test.fail_test()
-
-test.pass_test()
+++ /dev/null
-print "sample\\path\\foo.cpp"
+++ /dev/null
-#!/bin/bash
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-python ../../../gyp --debug variables --debug general --format gypd --depth . commands.gyp > commands.gyp.stdout
-python ../../../gyp --ignore-environment --debug variables --debug general --format gypd --depth . commands.gyp > commands.gyp.ignore-env.stdout
-cp -f commands.gypd commands.gypd.golden
-python ../../../gyp --debug variables --debug general --format gypd --depth . commands-repeated.gyp > commands-repeated.gyp.stdout
-cp -f commands-repeated.gypd commands-repeated.gypd.golden
+++ /dev/null
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names.txt <@(names', 'is_array': '', 'replace': '<|(names.txt <@(names)', 'type': '<|', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names', 'is_array': '', 'replace': '<@(names)', 'type': '<@', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'names.txt John Jacob Jingleheimer Schmidt', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'names.txt', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names_listfile', 'is_array': '', 'replace': '<(names_listfile)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'names.txt', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names_listfile', 'is_array': '', 'replace': '<(names_listfile)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'names.txt', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'cat <(names_listfile', 'is_array': '', 'replace': '<!@(cat <(names_listfile)', 'type': '<!@', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'names_listfile', 'is_array': '', 'replace': '<(names_listfile)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'cat names.txt', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'cat names.txt' in directory 'src'
-VARIABLES:input.py:797:ExpandVariables Found output ['John', 'Jacob', 'Jingleheimer', 'Schmidt'], recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'sources.txt <@(_sources', 'is_array': '', 'replace': '<|(sources.txt <@(_sources)', 'type': '<|', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': '_sources', 'is_array': '', 'replace': '<@(_sources)', 'type': '<@', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'sources.txt John Jacob Jingleheimer Schmidt', recursing.
-VARIABLES:input.py:797:ExpandVariables Found output 'sources.txt', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'sources_listfile', 'is_array': '', 'replace': '<(sources_listfile)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'sources.txt', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'sources_listfile', 'is_array': '', 'replace': '<(sources_listfile)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'sources.txt', recursing.
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'cat <(sources_listfile', 'is_array': '', 'replace': '<!@(cat <(sources_listfile)', 'type': '<!@', 'command_string': None}
-VARIABLES:input.py:562:ExpandVariables Matches: {'content': 'sources_listfile', 'is_array': '', 'replace': '<(sources_listfile)', 'type': '<', 'command_string': None}
-VARIABLES:input.py:797:ExpandVariables Found output 'cat sources.txt', recursing.
-VARIABLES:input.py:676:ExpandVariables Executing command 'cat sources.txt' in directory 'src'
-VARIABLES:input.py:797:ExpandVariables Found output ['John', 'Jacob', 'Jingleheimer', 'Schmidt'], recursing.
+++ /dev/null
-{'_DEPTH': '.',
- 'included_files': ['filelist.gyp'],
- 'targets': [{'actions': [{'action': ['python', 'dummy.py', 'names.txt'],
- 'action_name': 'test_action',
- 'inputs': ['names.txt',
- 'John',
- 'Jacob',
- 'Jingleheimer',
- 'Schmidt'],
- 'outputs': ['dummy_foo']}],
- 'configurations': {'Default': {}},
- 'default_configuration': 'Default',
- 'target_name': 'foo',
- 'toolset': 'target',
- 'type': 'none',
- 'variables': {'names_listfile': 'names.txt'}},
- {'actions': [{'action': ['python', 'dummy.py', 'sources.txt'],
- 'action_name': 'test_action',
- 'inputs': ['sources.txt',
- 'John',
- 'Jacob',
- 'Jingleheimer',
- 'Schmidt'],
- 'outputs': ['dummy_foo']}],
- 'configurations': {'Default': {}},
- 'default_configuration': 'Default',
- 'sources': ['John', 'Jacob', 'Jingleheimer', 'Schmidt'],
- 'sources_excluded': ['Astor', 'Jerome', 'Schultz'],
- 'target_name': 'bar',
- 'toolset': 'target',
- 'type': 'none',
- 'variables': {'sources_listfile': 'sources.txt'}}],
- 'variables': {'names': ['John',
- 'Jacob',
- 'Astor',
- 'Jingleheimer',
- 'Jerome',
- 'Schmidt',
- 'Schultz'],
- 'names!': ['Astor'],
- 'names/': [['exclude', 'Sch.*'],
- ['include', '.*dt'],
- ['exclude', 'Jer.*']]}}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Test variable expansion of '<|(list.txt ...)' syntax commands.
-"""
-
-import os
-import sys
-
-import TestGyp
-
-test = TestGyp.TestGyp(format='gypd')
-
-expect = test.read('filelist.gyp.stdout')
-if sys.platform == 'win32':
- expect = expect.replace('/', r'\\').replace('\r\n', '\n')
-
-test.run_gyp('src/filelist.gyp',
- '--debug', 'variables',
- stdout=expect, ignore_line_numbers=True)
-
-# Verify the filelist.gypd against the checked-in expected contents.
-#
-# Normally, we should canonicalize line endings in the expected
-# contents file setting the Subversion svn:eol-style to native,
-# but that would still fail if multiple systems are sharing a single
-# workspace on a network-mounted file system. Consequently, we
-# massage the Windows line endings ('\r\n') in the output to the
-# checked-in UNIX endings ('\n').
-
-contents = test.read('src/filelist.gypd').replace(
- '\r', '').replace('\\\\', '/')
-expect = test.read('filelist.gypd.golden').replace('\r', '')
-if not test.match(contents, expect):
- print "Unexpected contents of `src/filelist.gypd'"
- test.diff(expect, contents, 'src/filelist.gypd ')
- test.fail_test()
-
-contents = test.read('src/names.txt')
-expect = 'John\nJacob\nJingleheimer\nSchmidt\n'
-if not test.match(contents, expect):
- print "Unexpected contents of `src/names.txt'"
- test.diff(expect, contents, 'src/names.txt ')
- test.fail_test()
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This is a test to make sure that <|(foo.txt a b c) generates
-# a pre-calculated file list at gyp time and returns foo.txt.
-# This feature is useful to work around limits in the number of arguments that
-# can be passed to rule/action.
-
-{
- 'variables': {
- 'names': [
- 'John',
- 'Jacob',
- 'Astor',
- 'Jingleheimer',
- 'Jerome',
- 'Schmidt',
- 'Schultz',
- ],
- 'names!': [
- 'Astor',
- ],
- 'names/': [
- ['exclude', 'Sch.*'],
- ['include', '.*dt'],
- ['exclude', 'Jer.*'],
- ],
- },
- 'targets': [
- {
- 'target_name': 'foo',
- 'type': 'none',
- 'variables': {
- 'names_listfile': '<|(names.txt <@(names))',
- },
- 'actions': [
- {
- 'action_name': 'test_action',
- 'inputs' : [
- '<(names_listfile)',
- '<!@(cat <(names_listfile))',
- ],
- 'outputs': [
- 'dummy_foo',
- ],
- 'action': [
- 'python', 'dummy.py', '<(names_listfile)',
- ],
- },
- ],
- },
- {
- 'target_name': 'bar',
- 'type': 'none',
- 'sources': [
- 'John',
- 'Jacob',
- 'Astor',
- 'Jingleheimer',
- 'Jerome',
- 'Schmidt',
- 'Schultz',
- ],
- 'sources!': [
- 'Astor',
- ],
- 'sources/': [
- ['exclude', 'Sch.*'],
- ['include', '.*dt'],
- ['exclude', 'Jer.*'],
- ],
- 'variables': {
- 'sources_listfile': '<|(sources.txt <@(_sources))',
- },
- 'actions': [
- {
- 'action_name': 'test_action',
- 'inputs' : [
- '<(sources_listfile)',
- '<!@(cat <(sources_listfile))',
- ],
- 'outputs': [
- 'dummy_foo',
- ],
- 'action': [
- 'python', 'dummy.py', '<(sources_listfile)',
- ],
- },
- ],
- },
- ],
-}
+++ /dev/null
-#!/bin/bash
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-python ../../../gyp --debug variables --debug general --format gypd --depth . src/filelist.gyp > filelist.gyp.stdout
-cp -f src/filelist.gypd filelist.gypd.golden
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that ^(latelate) style variables work.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp()
-
-test.run_gyp('latelate.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('latelate.gyp', test.ALL, chdir='relocate/src')
-
-test.run_built_executable(
- 'program', chdir='relocate/src', stdout='program.cc\n')
-
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'target_conditions': [
- ['has_lame==1', {
- 'sources/': [
- ['exclude', 'lame'],
- ],
- }],
- ],
- },
- 'targets': [
- {
- 'target_name': 'program',
- 'type': 'executable',
- 'variables': {
- 'has_lame': 1,
- },
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'defines': [
- 'FOO="^(_sources)"',
- ],
- 'sources': [
- 'program.cc',
- 'this_is_lame.cc',
- ],
- },
- ],
-}
+++ /dev/null
-/*
- * Copyright (c) 2012 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <stdio.h>
-
-
-int main(int argc, char *argv[]) {
- printf(FOO "\n");
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure <(CONFIGURATION_NAME) variable is correctly expanded.
-"""
-
-import TestGyp
-
-import sys
-
-test = TestGyp.TestGyp()
-test.set_configuration('C1')
-
-test.run_gyp('variable-in-path.gyp')
-test.build('variable-in-path.gyp', 'hello1')
-test.build('variable-in-path.gyp', 'hello2')
-
-
-test.pass_test()
+++ /dev/null
-# Copyright (c) 2010 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello1',
- 'type': 'executable',
- 'sources': [
- '<(CONFIGURATION_NAME)/hello.cc',
- ],
- },
- {
- 'target_name': 'hello2',
- 'type': 'executable',
- 'sources': [
- './<(CONFIGURATION_NAME)/hello.cc',
- ],
- },
- ],
- 'target_defaults': {
- 'default_configuration': 'C1',
- 'configurations': {
- 'C1': {
- },
- 'C2': {
- },
- },
- },
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verify handling of build variants.
-
-TODO: Right now, only the SCons generator supports this, so the
-test case is SCons-specific. In particular, it relise on SCons'
-ability to rebuild in response to changes on the command line. It
-may be simpler to just drop this feature if the other generators
-can't be made to behave the same way.
-"""
-
-import TestGyp
-
-test = TestGyp.TestGyp(formats=['scons'])
-
-test.run_gyp('variants.gyp', chdir='src')
-
-test.relocate('src', 'relocate/src')
-
-test.build('variants.gyp', chdir='relocate/src')
-
-test.run_built_executable('variants',
- chdir='relocate/src',
- stdout="Hello, world!\n")
-
-test.sleep()
-test.build('variants.gyp', 'VARIANT1=1', chdir='relocate/src')
-
-test.run_built_executable('variants',
- chdir='relocate/src',
- stdout="Hello from VARIANT1\n")
-
-test.sleep()
-test.build('variants.gyp', 'VARIANT2=1', chdir='relocate/src')
-
-test.run_built_executable('variants',
- chdir='relocate/src',
- stdout="Hello from VARIANT2\n")
-
-test.pass_test()
+++ /dev/null
-#include <stdio.h>
-
-int main(int argc, char *argv[])
-{
-#if defined(VARIANT1)
- printf("Hello from VARIANT1\n");
-#elif defined(VARIANT2)
- printf("Hello from VARIANT2\n");
-#else
- printf("Hello, world!\n");
-#endif
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'variants',
- 'type': 'executable',
- 'sources': [
- 'variants.c',
- ],
- 'variants': {
- 'variant1' : {
- 'defines': [
- 'VARIANT1',
- ],
- },
- 'variant2' : {
- 'defines': [
- 'VARIANT2',
- ],
- },
- },
- },
- ],
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'sources_with_asm',
- 'type': 'executable',
- 'sources': [
- 'hello.cc',
- 'b.s',
- 'c.S',
- ],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_batch',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'copy_to_output',
- 'inputs': ['infile'],
- 'outputs': ['outfile'],
- 'action': ['somecmd.bat', 'infile', 'outfile'],
- 'msvs_cygwin_shell': 0,
- }
- ],
- },
- ]
-}
+++ /dev/null
-@echo off\r
-:: The redirs to nul are important. %2 can end up being an unterminated "'d\r
-:: string, so the remainder of the command line becomes the target file name,\r
-:: which in turn fails because it's a filename containing >, nul, etc.\r
-copy /y %1 %2 >nul 2>nul\r
+++ /dev/null
-@echo off
-
-:: Copyright (c) 2012 Google Inc. All rights reserved.
-:: Use of this source code is governed by a BSD-style license that can be
-:: found in the LICENSE file.
-
-copy %1 %2
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'target_defaults': {
- 'msvs_cygwin_dirs': ['../../../../../<(DEPTH)/third_party/cygwin'],
- },
- 'targets': [
- {
- 'target_name': 'test_batch',
- 'type': 'none',
- 'rules': [
- {
- 'rule_name': 'build_with_batch',
- 'msvs_cygwin_shell': 0,
- 'extension': 'S',
- 'inputs': ['<(RULE_INPUT_PATH)'],
- 'outputs': ['output.obj'],
- 'action': ['call go.bat', '<(RULE_INPUT_PATH)', 'output.obj'],
- },],
- 'sources': ['a.S'],
- },
- {
- 'target_name': 'test_call_separate',
- 'type': 'none',
- 'rules': [
- {
- 'rule_name': 'build_with_batch2',
- 'msvs_cygwin_shell': 0,
- 'extension': 'S',
- 'inputs': ['<(RULE_INPUT_PATH)'],
- 'outputs': ['output2.obj'],
- 'action': ['call', 'go.bat', '<(RULE_INPUT_PATH)', 'output2.obj'],
- },],
- 'sources': ['a.S'],
- },
- {
- 'target_name': 'test_with_spaces',
- 'type': 'none',
- 'rules': [
- {
- 'rule_name': 'build_with_batch3',
- 'msvs_cygwin_shell': 0,
- 'extension': 'S',
- 'inputs': ['<(RULE_INPUT_PATH)'],
- 'outputs': ['output3.obj'],
- 'action': ['bat with spaces.bat', '<(RULE_INPUT_PATH)', 'output3.obj'],
- },],
- 'sources': ['a.S'],
- },
- {
- 'target_name': 'test_with_double_quotes',
- 'type': 'none',
- 'rules': [
- {
- 'rule_name': 'build_with_batch3',
- 'msvs_cygwin_shell': 1,
- 'extension': 'S',
- 'inputs': ['<(RULE_INPUT_PATH)'],
- 'outputs': ['output4.obj'],
- 'arguments': ['-v'],
- 'action': ['python', '-c', 'import shutil; '
- 'shutil.copy("<(RULE_INPUT_PATH)", "output4.obj")'],
- },],
- 'sources': ['a.S'],
- },
- {
- 'target_name': 'test_with_single_quotes',
- 'type': 'none',
- 'rules': [
- {
- 'rule_name': 'build_with_batch3',
- 'msvs_cygwin_shell': 1,
- 'extension': 'S',
- 'inputs': ['<(RULE_INPUT_PATH)'],
- 'outputs': ['output5.obj'],
- 'action': ['python', '-c', "import shutil; "
- "shutil.copy('<(RULE_INPUT_PATH)', 'output5.obj')"],
- },],
- 'sources': ['a.S'],
- },
- ]
-}
+++ /dev/null
-@echo off
-
-:: Copyright (c) 2012 Google Inc. All rights reserved.
-:: Use of this source code is governed by a BSD-style license that can be
-:: found in the LICENSE file.
-
-copy %1 %2
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_batch_depth',
- 'type': 'none',
- 'variables': {
- # Taken from native_client/build/common.gypi. Seems unintentional (a
- # string in a 1 element list)? But since it works on other generators,
- # I guess it should work here too.
- 'filepath': [ 'call <(DEPTH)/../../../go.bat' ],
- },
- 'rules': [
- {
- 'rule_name': 'build_with_batch4',
- 'msvs_cygwin_shell': 0,
- 'extension': 'S',
- 'inputs': ['<(RULE_INPUT_PATH)'],
- 'outputs': ['output4.obj'],
- 'action': ['<@(filepath)', '<(RULE_INPUT_PATH)', 'output4.obj'],
- },],
- 'sources': ['<(DEPTH)\\..\\..\\..\\a.S'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// No path qualification to test compiler include dir specification.
-#include "header.h"
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_incs',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'AdditionalIncludeDirectories': [
- 'subdir',
- ],
- }
- },
- 'sources': ['additional-include-dirs.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- // Generate a warning that will appear at level 4, but not level 1
- // (truncation and unused local).
- char c = 123456;
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_additional_none',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '4',
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['additional-options.cc'],
- },
- {
- 'target_name': 'test_additional_one',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '4',
- 'WarnAsError': 'true',
- 'AdditionalOptions': [ '/W1' ],
- }
- },
- 'sources': ['additional-options.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_analysis_on',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnablePREfast': 'true',
- 'WarnAsError': 'true',
- },
- },
- 'sources': ['uninit.cc'],
- },
- {
- 'target_name': 'test_analysis_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnablePREfast': 'false',
- 'WarnAsError': 'true',
- },
- },
- 'sources': ['uninit.cc'],
- },
- {
- 'target_name': 'test_analysis_unspec',
- 'type': 'executable',
- 'sources': ['uninit.cc'],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarnAsError': 'true',
- },
- },
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Turn debug information on so that we can see the name of the buffer
- # security check cookie in the disassembly.
- {
- 'target_name': 'test_bsc_unset',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- },
- 'sources': ['buffer-security.cc'],
- },
- {
- 'target_name': 'test_bsc_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'BufferSecurityCheck': 'false',
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- },
- 'sources': ['buffer-security.cc'],
- },
- {
- 'target_name': 'test_bsc_on',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'BufferSecurityCheck': 'true',
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- },
- 'sources': ['buffer-security.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <malloc.h>
-#include <string.h>
-
-int main() {
- char* stuff = reinterpret_cast<char*>(_alloca(256));
- strcpy(stuff, "blah");
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _MBCS
-#error
-#endif
-
-int main() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _UNICODE
-#error
-#endif
-
-#ifndef UNICODE
-#error
-#endif
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_cs_notset',
- 'product_name': 'test_cs_notset',
- 'type': 'executable',
- 'msvs_configuration_attributes': {
- 'CharacterSet': '0'
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_cs_unicode',
- 'product_name': 'test_cs_unicode',
- 'type': 'executable',
- 'msvs_configuration_attributes': {
- 'CharacterSet': '1'
- },
- 'sources': ['character-set-unicode.cc'],
- },
- {
- 'target_name': 'test_cs_mbcs',
- 'product_name': 'test_cs_mbcs',
- 'type': 'executable',
- 'msvs_configuration_attributes': {
- 'CharacterSet': '2'
- },
- 'sources': ['character-set-mbcs.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test-debug-format-off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '0'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test-debug-format-oldstyle',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '1'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test-debug-format-pdb',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test-debug-format-editcontinue',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '4'
- }
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <excpt.h>
-#include <stdlib.h>
-
-void fail() {
- try {
- int i = 0, j = 1;
- j /= i;
- } catch(...) {
- exit(1);
- }
-}
-
-int main() {
- __try {
- fail();
- } __except(EXCEPTION_EXECUTE_HANDLER) {
- return 2;
- }
- return 3;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Optimization disabled so that the exception-causing code is not removed
- # (divide by zero was getting optimized away in VS2010).
- {
- 'target_name': 'test_eh_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'ExceptionHandling': '0',
- 'WarnAsError': 'true',
- 'Optimization': '0',
- }
- },
- 'sources': ['exception-handling-on.cc'],
- },
- {
- 'target_name': 'test_eh_s',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'ExceptionHandling': '1',
- 'WarnAsError': 'true',
- 'Optimization': '0',
- }
- },
- 'sources': ['exception-handling-on.cc'],
- },
- {
- 'target_name': 'test_eh_a',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'ExceptionHandling': '2',
- 'WarnAsError': 'true',
- 'Optimization': '0',
- }
- },
- 'sources': ['exception-handling-on.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int comdat_function() {
- return 1;
-}
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_fll_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnableFunctionLevelLinking': 'false'
- }
- },
- 'sources': ['function-level-linking.cc'],
- },
- {
- 'target_name': 'test_fll_on',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnableFunctionLevelLinking': 'true',
- }
- },
- 'sources': ['function-level-linking.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_opt_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'Optimization': '0'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_lev_size',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'Optimization': '1'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_lev_speed',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'Optimization': '2'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_lev_max',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'Optimization': '3'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_unset',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_fpo',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'OmitFramePointers': 'true'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_fpo_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'OmitFramePointers': 'false'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_inline_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'InlineFunctionExpansion': '0'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_inline_manual',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'InlineFunctionExpansion': '1'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_inline_auto',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'InlineFunctionExpansion': '2'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_neither',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'FavorSizeOrSpeed': '0'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_speed',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'FavorSizeOrSpeed': '1'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_size',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'FavorSizeOrSpeed': '2'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_opt_wpo',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WholeProgramOptimization': 'true'
- }
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int some_function() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_pdbname',
- 'type': 'executable',
- 'sources': [
- 'hello.cc',
- 'pdbname.cc',
- ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- },
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _CPPRTTI
-#error
-#endif
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_rtti_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'RuntimeTypeInfo': 'false',
- 'WarnAsError': 'true'
- }
- },
- 'sources': ['rtti-on.cc'],
- },
- {
- 'target_name': 'test_rtti_on',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'RuntimeTypeInfo': 'true',
- 'WarnAsError': 'true'
- }
- },
- 'sources': ['rtti-on.cc'],
- },
- {
- 'target_name': 'test_rtti_unset',
- 'type': 'executable',
- 'msvs_settings': {
- },
- 'sources': ['rtti-on.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef __MSVC_RUNTIME_CHECKS
-#error
-#endif
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_brc_none',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'Optimization': '0',
- }
- },
- 'sources': ['runtime-checks.cc'],
- },
- {
- 'target_name': 'test_brc_1',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'Optimization': '0',
- 'BasicRuntimeChecks': '3'
- }
- },
- 'sources': ['runtime-checks.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _MT
-#error
-#endif
-
-#ifdef _DEBUG
-#error
-#endif
-
-#ifndef _DLL
-#error
-#endif
-
-int main() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _MT
-#error
-#endif
-
-#ifndef _DEBUG
-#error
-#endif
-
-#ifndef _DLL
-#error
-#endif
-
-int main() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _MT
-#error
-#endif
-
-#ifdef _DEBUG
-#error
-#endif
-
-#ifdef _DLL
-#error
-#endif
-
-int main() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _MT
-#error
-#endif
-
-#ifndef _DEBUG
-#error
-#endif
-
-#ifdef _DLL
-#error
-#endif
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_rl_md',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'RuntimeLibrary': '2'
- }
- },
- 'sources': ['runtime-library-md.cc'],
- },
- {
- 'target_name': 'test_rl_mdd',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'RuntimeLibrary': '3'
- }
- },
- 'sources': ['runtime-library-mdd.cc'],
- },
- {
- 'target_name': 'test_rl_mt',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'RuntimeLibrary': '0'
- }
- },
- 'sources': ['runtime-library-mt.cc'],
- },
- {
- 'target_name': 'test_rl_mtd',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'RuntimeLibrary': '1'
- }
- },
- 'sources': ['runtime-library-mtd.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Should trigger C6001: using uninitialized memory <variable> for |i|.
-int f(bool b) {
- int i;
- if (b)
- i = 0;
- return i;
-}
-
-int main() {}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- // Cause a warning, even at /W1
- int export;
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_warn_as_error_false',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarnAsError': 'false'
- }
- },
- 'sources': ['warning-as-error.cc']
- },
- {
- 'target_name': 'test_warn_as_error_true',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarnAsError': 'true'
- }
- },
- 'sources': ['warning-as-error.cc']
- },
- {
- 'target_name': 'test_warn_as_error_unset',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- }
- },
- 'sources': ['warning-as-error.cc']
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Level 1
- {
- 'target_name': 'test_wl1_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '1',
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['warning-level1.cc'],
- },
- {
- 'target_name': 'test_wl1_pass',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '1',
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['warning-level2.cc'],
- },
-
- # Level 2
- {
- 'target_name': 'test_wl2_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '2',
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['warning-level2.cc'],
- },
- {
- 'target_name': 'test_wl2_pass',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '2',
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['warning-level3.cc'],
- },
-
- # Level 3
- {
- 'target_name': 'test_wl3_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '3',
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['warning-level3.cc'],
- },
- {
- 'target_name': 'test_wl3_pass',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '3',
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['warning-level4.cc'],
- },
-
-
- # Level 4
- {
- 'target_name': 'test_wl4_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '4',
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['warning-level4.cc'],
- },
-
- # Default level
- {
- 'target_name': 'test_def_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarnAsError': 'true',
- }
- },
- 'sources': ['warning-level1.cc'],
- },
- {
- 'target_name': 'test_def_pass',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- }
- },
- 'sources': ['warning-level2.cc'],
- },
-
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- int export; // Cause a level 1 warning (C4237).
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int f(int x) {
- return 0;
-}
-
-int main() {
- double x = 10.1;
- // Cause a level 2 warning (C4243).
- return f(x);
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Cause a level 3 warning (C4359).
-struct __declspec(align(8)) C8 { __int64 i; };
-struct __declspec(align(4)) C4 { C8 m8; };
-
-int main() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- const int i = -1;
- // Cause a level 4 warning (C4245).
- unsigned int j = i;
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure .s files aren't passed to cl.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'asm-files'
- test.run_gyp('asm-files.gyp', chdir=CHDIR)
- # The compiler will error out if it's passed the .s files, so just make sure
- # the build succeeds. The compiler doesn't directly support building
- # assembler files on Windows, they have to be built explicitly with a
- # third-party tool.
- test.build('asm-files.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure additional include dirs are extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('additional-include-dirs.gyp', chdir=CHDIR)
- test.build('additional-include-dirs.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure additional manual compiler flags are extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('additional-options.gyp', chdir=CHDIR)
-
- # Warning level not overidden, must fail.
- test.build('additional-options.gyp', 'test_additional_none', chdir=CHDIR,
- status=1)
-
- # Warning level is overridden, must succeed.
- test.build('additional-options.gyp', 'test_additional_one', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure PREfast (code analysis) setting is extracted properly.
-"""
-
-import TestGyp
-
-import os
-import sys
-
-if (sys.platform == 'win32' and
- int(os.environ.get('GYP_MSVS_VERSION', 0)) >= 2012):
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('analysis.gyp', chdir=CHDIR)
-
- # Analysis enabled, should fail.
- test.build('analysis.gyp', 'test_analysis_on', chdir=CHDIR, status=1)
-
- # Analysis not enabled, or unspecified, should pass.
- test.build('analysis.gyp', 'test_analysis_off', chdir=CHDIR)
- test.build('analysis.gyp', 'test_analysis_unspec', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure buffer security check setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('buffer-security-check.gyp', chdir=CHDIR)
- test.build('buffer-security-check.gyp', chdir=CHDIR)
-
- def GetDisassemblyOfMain(exe):
- # The standard library uses buffer security checks independent of our
- # buffer security settings, so we extract just our code (i.e. main()) to
- # check against.
- full_path = test.built_file_path(exe, chdir=CHDIR)
- output = test.run_dumpbin('/disasm', full_path)
- result = []
- in_main = False
- for line in output.splitlines():
- if line == '_main:':
- in_main = True
- elif in_main:
- # Disassembly of next function starts.
- if line.startswith('_'):
- break
- result.append(line)
- return '\n'.join(result)
-
- # Buffer security checks are on by default, make sure security_cookie
- # appears in the disassembly of our code.
- if 'security_cookie' not in GetDisassemblyOfMain('test_bsc_unset.exe'):
- test.fail_test()
-
- # Explicitly on.
- if 'security_cookie' not in GetDisassemblyOfMain('test_bsc_on.exe'):
- test.fail_test()
-
- # Explicitly off, shouldn't be a reference to the security cookie.
- if 'security_cookie' in GetDisassemblyOfMain('test_bsc_off.exe'):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure character set setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('character-set.gyp', chdir=CHDIR)
- test.build('character-set.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure debug format settings are extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('debug-format.gyp', chdir=CHDIR)
-
- # While there's ways to via .pdb contents, the .pdb doesn't include
- # which style the debug information was created from, so we resort to just
- # verifying the flags are correct on the command line.
-
- ninja_file = test.built_file_path('obj/test-debug-format-off.ninja',
- chdir=CHDIR)
- test.must_not_contain(ninja_file, '/Z7')
- test.must_not_contain(ninja_file, '/Zi')
- test.must_not_contain(ninja_file, '/ZI')
-
- ninja_file = test.built_file_path('obj/test-debug-format-oldstyle.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/Z7')
-
- ninja_file = test.built_file_path('obj/test-debug-format-pdb.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/Zi')
-
- ninja_file = test.built_file_path('obj/test-debug-format-editcontinue.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/ZI')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure exception handling settings are extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('exception-handling.gyp', chdir=CHDIR)
-
- # Must fail.
- test.build('exception-handling.gyp', 'test_eh_off', chdir=CHDIR,
- status=1)
-
- # Must succeed.
- test.build('exception-handling.gyp', 'test_eh_s', chdir=CHDIR)
- test.build('exception-handling.gyp', 'test_eh_a', chdir=CHDIR)
-
- # Error code must be 1 if EHa, and 2 if EHsc.
- test.run_built_executable('test_eh_a', chdir=CHDIR, status=1)
- test.run_built_executable('test_eh_s', chdir=CHDIR, status=2)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure function-level linking setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('function-level-linking.gyp', chdir=CHDIR)
- test.build('function-level-linking.gyp', test.ALL, chdir=CHDIR)
-
- def CheckForSectionString(binary, search_for, should_exist):
- output = test.run_dumpbin('/headers', binary)
- if should_exist and search_for not in output:
- print 'Did not find "%s" in %s' % (search_for, binary)
- test.fail_test()
- elif not should_exist and search_for in output:
- print 'Found "%s" in %s (and shouldn\'t have)' % (search_for, binary)
- test.fail_test()
-
- def Object(proj, obj):
- sep = '.' if test.format == 'ninja' else '\\'
- return 'obj\\%s%s%s' % (proj, sep, obj)
-
- look_for = '''COMDAT; sym= "int __cdecl comdat_function'''
-
- # When function level linking is on, the functions should be listed as
- # separate comdat entries.
-
- CheckForSectionString(
- test.built_file_path(Object('test_fll_on', 'function-level-linking.obj'),
- chdir=CHDIR),
- look_for,
- should_exist=True)
-
- CheckForSectionString(
- test.built_file_path(Object('test_fll_off', 'function-level-linking.obj'),
- chdir=CHDIR),
- look_for,
- should_exist=False)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure optimization settings are extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('optimizations.gyp', chdir=CHDIR)
-
- # It's hard to map flags to output contents in a non-fragile way (especially
- # handling both 2008/2010), so just verify the correct ninja command line
- # contents.
-
- ninja_file = test.built_file_path('obj/test_opt_off.ninja', chdir=CHDIR)
- test.must_contain(ninja_file, 'cflags = /Od')
-
- ninja_file = test.built_file_path('obj/test_opt_lev_size.ninja', chdir=CHDIR)
- test.must_contain(ninja_file, 'cflags = /O1')
-
- ninja_file = test.built_file_path('obj/test_opt_lev_speed.ninja', chdir=CHDIR)
- test.must_contain(ninja_file, 'cflags = /O2')
-
- ninja_file = test.built_file_path('obj/test_opt_lev_max.ninja', chdir=CHDIR)
- test.must_contain(ninja_file, 'cflags = /Ox')
-
- ninja_file = test.built_file_path('obj/test_opt_unset.ninja', chdir=CHDIR)
- test.must_not_contain(ninja_file, '/Od')
- test.must_not_contain(ninja_file, '/O1')
- test.must_not_contain(ninja_file, '/O2')
- test.must_not_contain(ninja_file, '/Ox')
-
- ninja_file = test.built_file_path('obj/test_opt_fpo.ninja', chdir=CHDIR)
- test.must_contain(ninja_file, '/Oy')
- test.must_not_contain(ninja_file, '/Oy-')
-
- ninja_file = test.built_file_path('obj/test_opt_fpo_off.ninja', chdir=CHDIR)
- test.must_contain(ninja_file, '/Oy-')
-
- ninja_file = test.built_file_path('obj/test_opt_inline_off.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/Ob0')
-
- ninja_file = test.built_file_path('obj/test_opt_inline_manual.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/Ob1')
-
- ninja_file = test.built_file_path('obj/test_opt_inline_auto.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/Ob2')
-
- ninja_file = test.built_file_path('obj/test_opt_neither.ninja',
- chdir=CHDIR)
- test.must_not_contain(ninja_file, '/Os')
- test.must_not_contain(ninja_file, '/Ot')
-
- ninja_file = test.built_file_path('obj/test_opt_size.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/Os')
-
- ninja_file = test.built_file_path('obj/test_opt_speed.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/Ot')
-
- ninja_file = test.built_file_path('obj/test_opt_wpo.ninja',
- chdir=CHDIR)
- test.must_contain(ninja_file, '/GL')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure pdb is named as expected (shared between .cc files).
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('pdbname.gyp', chdir=CHDIR)
- test.build('pdbname.gyp', test.ALL, chdir=CHDIR)
-
- # Confirm that the default behaviour is to name the .pdb per-target (rather
- # than per .cc file).
- test.built_file_must_exist('test_pdbname.pdb', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure RTTI setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('rtti.gyp', chdir=CHDIR)
-
- # Must fail.
- test.build('rtti.gyp', 'test_rtti_off', chdir=CHDIR, status=1)
-
- # Must succeed.
- test.build('rtti.gyp', 'test_rtti_on', chdir=CHDIR)
-
- # Must succeed.
- test.build('rtti.gyp', 'test_rtti_unset', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure RTC setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('runtime-checks.gyp', chdir=CHDIR)
-
- # Runtime checks disabled, should fail.
- test.build('runtime-checks.gyp', 'test_brc_none', chdir=CHDIR, status=1)
-
- # Runtime checks enabled, should pass.
- test.build('runtime-checks.gyp', 'test_brc_1', chdir=CHDIR)
-
- # TODO(scottmg): There are other less frequently used/partial options, but
- # it's not clear how to verify them, so ignore for now.
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure runtime C library setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('runtime-library.gyp', chdir=CHDIR)
- test.build('runtime-library.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure warning-as-error is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('warning-as-error.gyp', chdir=CHDIR)
-
- # The source file contains a warning, so if WarnAsError is false (or
- # default, which is also false), then the build should succeed, otherwise it
- # must fail.
-
- test.build('warning-as-error.gyp', 'test_warn_as_error_false', chdir=CHDIR)
- test.build('warning-as-error.gyp', 'test_warn_as_error_unset', chdir=CHDIR)
- test.build('warning-as-error.gyp', 'test_warn_as_error_true', chdir=CHDIR,
- status=1)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure warning level is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'compiler-flags'
- test.run_gyp('warning-level.gyp', chdir=CHDIR)
-
- # A separate target for each warning level: one pass (compiling a file
- # containing a warning that's above the specified level); and one fail
- # (compiling a file at the specified level). No pass for 4 of course,
- # because it would have to have no warnings. The default warning level is
- # equivalent to level 1.
-
- test.build('warning-level.gyp', 'test_wl1_fail', chdir=CHDIR, status=1)
- test.build('warning-level.gyp', 'test_wl1_pass', chdir=CHDIR)
-
- test.build('warning-level.gyp', 'test_wl2_fail', chdir=CHDIR, status=1)
- test.build('warning-level.gyp', 'test_wl2_pass', chdir=CHDIR)
-
- test.build('warning-level.gyp', 'test_wl3_fail', chdir=CHDIR, status=1)
- test.build('warning-level.gyp', 'test_wl3_pass', chdir=CHDIR)
-
- test.build('warning-level.gyp', 'test_wl4_fail', chdir=CHDIR, status=1)
-
- test.build('warning-level.gyp', 'test_def_fail', chdir=CHDIR, status=1)
- test.build('warning-level.gyp', 'test_def_pass', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-
-Make sure the program in a command can be a called batch file, or an
-application in the path. Specifically, this means not quoting something like
-"call x.bat", lest the shell look for a program named "call x.bat", rather
-than calling "x.bat".
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
- CHDIR = 'command-quote'
- test.run_gyp('command-quote.gyp', chdir=CHDIR)
-
- test.build('command-quote.gyp', 'test_batch', chdir=CHDIR)
- test.build('command-quote.gyp', 'test_call_separate', chdir=CHDIR)
- test.build('command-quote.gyp', 'test_with_double_quotes', chdir=CHDIR)
- test.build('command-quote.gyp', 'test_with_single_quotes', chdir=CHDIR)
-
- # We confirm that this fails because other generators don't handle spaces in
- # inputs so it's preferable to not have it work here.
- test.build('command-quote.gyp', 'test_with_spaces', chdir=CHDIR, status=1)
-
- CHDIR = 'command-quote/subdir/and/another'
- test.run_gyp('in-subdir.gyp', chdir=CHDIR)
- test.build('in-subdir.gyp', 'test_batch_depth', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure additional library dependencies are handled.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('additional-deps.gyp', chdir=CHDIR)
- test.build('additional-deps.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure additional options are handled.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('additional-options.gyp', chdir=CHDIR)
- test.build('additional-options.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure aslr setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('aslr.gyp', chdir=CHDIR)
- test.build('aslr.gyp', test.ALL, chdir=CHDIR)
-
- def HasDynamicBase(exe):
- full_path = test.built_file_path(exe, chdir=CHDIR)
- output = test.run_dumpbin('/headers', full_path)
- return ' Dynamic base' in output
-
- # Default is to be on.
- if not HasDynamicBase('test_aslr_default.exe'):
- test.fail_test()
- if HasDynamicBase('test_aslr_no.exe'):
- test.fail_test()
- if not HasDynamicBase('test_aslr_yes.exe'):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure debug info setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('debug-info.gyp', chdir=CHDIR)
- test.build('debug-info.gyp', test.ALL, chdir=CHDIR)
-
- suffix = '.exe.pdb' if test.format == 'ninja' else '.pdb'
- test.built_file_must_not_exist('test_debug_off%s' % suffix, chdir=CHDIR)
- test.built_file_must_exist('test_debug_on%s' % suffix, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure we include the default libs.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('default-libs.gyp', chdir=CHDIR)
- test.build('default-libs.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure a .def file is handled in the link.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
-
- # Multiple .def files doesn't make any sense, should fail at generate time.
- test.run_gyp('deffile-multiple.gyp', chdir=CHDIR, stderr=None, status=1)
-
- test.run_gyp('deffile.gyp', chdir=CHDIR)
- test.build('deffile.gyp', test.ALL, chdir=CHDIR)
-
- def HasExport(binary, export):
- full_path = test.built_file_path(binary, chdir=CHDIR)
- output = test.run_dumpbin('/exports', full_path)
- return export in output
-
- # Make sure we only have the export when the .def file is in use.
-
- if HasExport('test_deffile_dll_notexported.dll', 'AnExportedFunction'):
- test.fail_test()
- if not HasExport('test_deffile_dll_ok.dll', 'AnExportedFunction'):
- test.fail_test()
-
- if HasExport('test_deffile_exe_notexported.exe', 'AnExportedFunction'):
- test.fail_test()
- if not HasExport('test_deffile_exe_ok.exe', 'AnExportedFunction'):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure delay load setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('delay-load-dlls.gyp', chdir=CHDIR)
- test.build('delay-load-dlls.gyp', test.ALL, chdir=CHDIR)
-
- prefix = 'contains the following delay load imports:'
- shell32_look_for = prefix + '\r\n\r\n SHELL32.dll'
-
- output = test.run_dumpbin(
- '/all', test.built_file_path('test_dld_none.exe', chdir=CHDIR))
- if prefix in output:
- test.fail_test()
-
- output = test.run_dumpbin(
- '/all', test.built_file_path('test_dld_shell32.exe', chdir=CHDIR))
- if shell32_look_for not in output:
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure entrypointsymbol setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('entrypointsymbol.gyp', chdir=CHDIR)
-
- test.build('entrypointsymbol.gyp', 'test_ok', chdir=CHDIR)
- test.build('entrypointsymbol.gyp', 'test_fail', chdir=CHDIR, status=1)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure fixed base setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('fixed-base.gyp', chdir=CHDIR)
- test.build('fixed-base.gyp', test.ALL, chdir=CHDIR)
-
- def GetHeaders(exe):
- full_path = test.built_file_path(exe, chdir=CHDIR)
- return test.run_dumpbin('/headers', full_path)
-
- # For exe, default is fixed, for dll, it's not fixed.
- if 'Relocations stripped' not in GetHeaders('test_fixed_default_exe.exe'):
- test.fail_test()
- if 'Relocations stripped' in GetHeaders('test_fixed_default_dll.dll'):
- test.fail_test()
-
- # Explicitly not fixed.
- if 'Relocations stripped' in GetHeaders('test_fixed_no.exe'):
- test.fail_test()
-
- # Explicitly fixed.
- if 'Relocations stripped' not in GetHeaders('test_fixed_yes.exe'):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure we generate a manifest file when linking binaries, including
-handling AdditionalManifestFiles.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('generate-manifest.gyp', chdir=CHDIR)
- test.build('generate-manifest.gyp', test.ALL, chdir=CHDIR)
- test.built_file_must_exist('test_manifest_exe.exe.manifest', chdir=CHDIR)
- test.built_file_must_exist('test_manifest_dll.dll.manifest', chdir=CHDIR)
-
- # Must contain the Win7 support GUID, but not the Vista one (from
- # extra2.manifest).
- extra1_manifest = test.built_file_path(
- 'test_manifest_extra1.exe.manifest', chdir=CHDIR)
- test.must_contain(extra1_manifest, '35138b9a-5d96-4fbd-8e2d-a2440225f93a')
- test.must_not_contain(extra1_manifest, 'e2011457-1546-43c5-a5fe-008deee3d3f0')
-
- # Must contain both.
- extra2_manifest = test.built_file_path(
- 'test_manifest_extra2.exe.manifest', chdir=CHDIR)
- test.must_contain(extra2_manifest, '35138b9a-5d96-4fbd-8e2d-a2440225f93a')
- test.must_contain(extra2_manifest, 'e2011457-1546-43c5-a5fe-008deee3d3f0')
-
- # Same as extra2, but using list syntax instead.
- extra_list_manifest = test.built_file_path(
- 'test_manifest_extra_list.exe.manifest', chdir=CHDIR)
- test.must_contain(extra_list_manifest, '35138b9a-5d96-4fbd-8e2d-a2440225f93a')
- test.must_contain(extra_list_manifest, 'e2011457-1546-43c5-a5fe-008deee3d3f0')
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure incremental linking setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('incremental.gyp', chdir=CHDIR)
- test.build('incremental.gyp', test.ALL, chdir=CHDIR)
-
- def HasILTTables(exe):
- full_path = test.built_file_path(exe, chdir=CHDIR)
- output = test.run_dumpbin('/disasm', full_path)
- return '@ILT+' in output
-
- # Default or unset is to be on.
- if not HasILTTables('test_incremental_unset.exe'):
- test.fail_test()
- if not HasILTTables('test_incremental_default.exe'):
- test.fail_test()
- if HasILTTables('test_incremental_no.exe'):
- test.fail_test()
- if not HasILTTables('test_incremental_yes.exe'):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure link_settings containing -lblah.lib is remapped to just blah.lib.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('library-adjust.gyp', chdir=CHDIR)
- test.build('library-adjust.gyp', test.ALL, chdir=CHDIR)
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure libpath is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
-
- # Build subdirectory library.
- test.run_gyp('subdir/library.gyp', chdir=CHDIR)
- test.build('subdir/library.gyp', test.ALL, chdir=CHDIR)
-
- # And then try to link the main project against the library using only
- # LIBPATH to find it.
- test.run_gyp('library-directories.gyp', chdir=CHDIR)
-
- # Without additional paths specified, should fail.
- test.build('library-directories.gyp', 'test_libdirs_none', chdir=CHDIR,
- status=1)
-
- # With the additional library directory, should pass.
- test.build('library-directories.gyp', 'test_libdirs_with', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure nodefaultlib setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('nodefaultlib.gyp', chdir=CHDIR)
-
- test.build('nodefaultlib.gyp', 'test_ok', chdir=CHDIR)
- test.build('nodefaultlib.gyp', 'test_fail', chdir=CHDIR, status=1)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure nxcompat setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('nxcompat.gyp', chdir=CHDIR)
- test.build('nxcompat.gyp', test.ALL, chdir=CHDIR)
-
- def GetHeaders(exe):
- return test.run_dumpbin('/headers', test.built_file_path(exe, chdir=CHDIR))
-
- # NXCOMPAT is on by default.
- if 'NX compatible' not in GetHeaders('test_nxcompat_default.exe'):
- test.fail_test()
-
- # Explicitly off, should not be marked NX compatiable.
- if 'NX compatible' in GetHeaders('test_nxcompat_no.exe'):
- test.fail_test()
-
- # Explicitly on.
- if 'NX compatible' not in GetHeaders('test_nxcompat_yes.exe'):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure comdat folding optimization setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('opt-icf.gyp', chdir=CHDIR)
- test.build('opt-icf.gyp', chdir=CHDIR)
-
- # We're specifying /DEBUG so the default is to not merge identical
- # functions, so all of the similar_functions should be preserved.
- output = test.run_dumpbin(
- '/disasm', test.built_file_path('test_opticf_default.exe', chdir=CHDIR))
- if output.count('similar_function') != 6: # 3 definitions, 3 calls.
- test.fail_test()
-
- # Explicitly off, all functions preserved seperately.
- output = test.run_dumpbin(
- '/disasm', test.built_file_path('test_opticf_no.exe', chdir=CHDIR))
- if output.count('similar_function') != 6: # 3 definitions, 3 calls.
- test.fail_test()
-
- # Explicitly on, all but one removed.
- output = test.run_dumpbin(
- '/disasm', test.built_file_path('test_opticf_yes.exe', chdir=CHDIR))
- if output.count('similar_function') != 4: # 1 definition, 3 calls.
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure reference optimization setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('opt-ref.gyp', chdir=CHDIR)
- test.build('opt-ref.gyp', chdir=CHDIR)
-
- # We're specifying /DEBUG so the default is to not remove unused functions.
- output = test.run_dumpbin(
- '/disasm', test.built_file_path('test_optref_default.exe', chdir=CHDIR))
- if 'unused_function' not in output:
- test.fail_test()
-
- # Explicitly off, unused_function preserved.
- output = test.run_dumpbin(
- '/disasm', test.built_file_path('test_optref_no.exe', chdir=CHDIR))
- if 'unused_function' not in output:
- test.fail_test()
-
- # Explicitly on, should be removed.
- output = test.run_dumpbin(
- '/disasm', test.built_file_path('test_optref_yes.exe', chdir=CHDIR))
- if 'unused_function' in output:
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure linker OutputFile setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('outputfile.gyp', chdir=CHDIR)
- test.build('outputfile.gyp', test.ALL, chdir=CHDIR)
-
- test.built_file_must_exist('blorp.exe', chdir=CHDIR)
- test.built_file_must_exist('blorp.dll', chdir=CHDIR)
- test.built_file_must_exist('subdir/blorp.exe', chdir=CHDIR)
- test.built_file_must_exist('blorp.lib', chdir=CHDIR)
- test.built_file_must_exist('subdir/blorp.lib', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that the 'Profile' attribute in VCLinker is extracted properly.
-"""
-
-import TestGyp
-
-import os
-import sys
-
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
- CHDIR = 'linker-flags'
- test.run_gyp('program-database.gyp', chdir=CHDIR)
- test.build('program-database.gyp', test.ALL, chdir=CHDIR)
-
- def FindFile(pdb):
- full_path = test.built_file_path(pdb, chdir=CHDIR)
- return os.path.isfile(full_path)
-
- # Verify the specified PDB is created when ProgramDatabaseFile
- # is provided.
- if not FindFile('name_outdir.pdb'):
- test.fail_test()
- if not FindFile('name_proddir.pdb'):
- test.fail_test()
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that the 'Profile' attribute in VCLinker is extracted properly.
-"""
-
-import TestGyp
-
-import os
-import sys
-
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
- CHDIR = 'linker-flags'
- test.run_gyp('profile.gyp', chdir=CHDIR)
- test.build('profile.gyp', test.ALL, chdir=CHDIR)
-
- def GetSummary(exe):
- full_path = test.built_file_path(exe, chdir=CHDIR)
- return test.run_dumpbin(full_path)
-
- # '.idata' section will be missing when /PROFILE is enabled.
- if '.idata' in GetSummary('test_profile_true.exe'):
- test.fail_test()
-
- if not '.idata' in GetSummary('test_profile_false.exe'):
- test.fail_test()
-
- if not '.idata' in GetSummary('test_profile_default.exe'):
- test.fail_test()
-
- test.pass_test()
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure we don't cause unnecessary builds due to import libs appearing
-to be out of date.
-"""
-
-import TestGyp
-
-import sys
-import time
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'importlib'
- test.run_gyp('importlib.gyp', chdir=CHDIR)
- test.build('importlib.gyp', test.ALL, chdir=CHDIR)
-
- # Delay briefly so that there's time for this touch not to have the
- # timestamp as the previous run.
- test.sleep()
-
- # Touch the .cc file; the .dll will rebuild, but the import libs timestamp
- # won't be updated.
- test.touch('importlib/has-exports.cc')
- test.build('importlib.gyp', 'test_importlib', chdir=CHDIR)
-
- # This is the important part. The .dll above will relink and have an updated
- # timestamp, however the import .libs timestamp won't be updated. So, we
- # have to handle restating inputs in ninja so the final binary doesn't
- # continually relink (due to thinking the .lib isn't up to date).
- test.up_to_date('importlib.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure subsystem setting is extracted properly.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'linker-flags'
- test.run_gyp('subsystem.gyp', chdir=CHDIR)
-
- test.build('subsystem.gyp', 'test_console_ok', chdir=CHDIR)
- test.build('subsystem.gyp', 'test_console_fail', chdir=CHDIR, status=1)
- test.build('subsystem.gyp', 'test_windows_ok', chdir=CHDIR)
- test.build('subsystem.gyp', 'test_windows_fail', chdir=CHDIR, status=1)
-
- # TODO(scottmg): There are other subsystems (WinCE, etc.) that we don't use.
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure that when ULDI is on, we link .objs that make up .libs rather than
-the .libs themselves.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'uldi'
- test.run_gyp('uldi.gyp', chdir=CHDIR)
- # When linking with ULDI, the duplicated function from the lib will be an
- # error.
- test.build('uldi.gyp', 'final_uldi', chdir=CHDIR, status=1)
- # And when in libs, the duplicated function will be silently dropped, so the
- # build succeeds.
- test.build('uldi.gyp', 'final_no_uldi', chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure long command lines work.
-"""
-
-import TestGyp
-
-import subprocess
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['ninja', 'msvs'])
-
- CHDIR = 'long-command-line'
- test.run_gyp('long-command-line.gyp', chdir=CHDIR)
- test.build('long-command-line.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure macro expansion of $(ProjectName) is handled.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'vs-macros'
- test.run_gyp('projectname.gyp', chdir=CHDIR)
- test.build('projectname.gyp', test.ALL, chdir=CHDIR)
- test.built_file_must_exist('test_expansions_plus_something.exe', chdir=CHDIR)
- test.built_file_must_exist(
- 'test_with_product_name_plus_something.exe', chdir=CHDIR)
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure macro expansion of $(VCInstallDir) is handled, and specifically
-always / terminated for compatibility.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'vs-macros'
- test.run_gyp('vcinstalldir.gyp', chdir=CHDIR)
- # This fails on VS because the trailing slash escapes the trailing quote.
- test.build('vcinstalldir.gyp', 'test_slash_trailing', chdir=CHDIR, status=1)
- test.build('vcinstalldir.gyp', 'test_slash_dir', chdir=CHDIR)
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Handle VS macro expansion containing gyp variables.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'vs-macros'
- test.run_gyp('containing-gyp.gyp', chdir=CHDIR)
- test.build('containing-gyp.gyp', test.ALL, chdir=CHDIR)
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Handle macro expansion in inputs and outputs of rules.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'vs-macros'
- test.run_gyp('input-output-macros.gyp', chdir=CHDIR)
-
- test.build('input-output-macros.gyp', 'test_expansions', chdir=CHDIR)
-
- test.built_file_must_exist('stuff.blah.something',
- content='Random data file.\nModified.',
- chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Handle default .idl build rules.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'idl-rules'
- test.run_gyp('basic-idl.gyp', chdir=CHDIR)
- test.build('basic-idl.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure batch files run as actions. Regression test for previously missing
-trailing quote on command line. cmd typically will implicitly insert a missing
-quote, but if the command ends in a quote, it will not insert another, so the
-command can sometimes become unterminated.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'batch-file-action'
- test.run_gyp('batch-file-action.gyp', chdir=CHDIR)
- test.build('batch-file-action.gyp', test.ALL, chdir=CHDIR)
-
- test.pass_test()
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Make sure we build and include .rc files.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
-
- CHDIR = 'rc-build'
- test.run_gyp('hello.gyp', chdir=CHDIR)
- test.build('hello.gyp', test.ALL, chdir=CHDIR)
- test.up_to_date('hello.gyp', 'resource_only_dll', chdir=CHDIR)
- test.run_built_executable('with_resources', chdir=CHDIR, status=4)
-
- test.pass_test()
+++ /dev/null
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.\r
-# Use of this source code is governed by a BSD-style license that can be\r
-# found in the LICENSE file.\r
-\r
-{\r
- 'variables': {\r
- 'midl_out_dir': '<(SHARED_INTERMEDIATE_DIR)',\r
- },\r
- 'targets': [\r
- {\r
- 'target_name': 'idl_test',\r
- 'type': 'executable',\r
- 'sources': [\r
- 'history_indexer.idl',\r
- '<(midl_out_dir)/history_indexer.h',\r
- '<(midl_out_dir)/history_indexer_i.c',\r
- 'history_indexer_user.cc',\r
- ],\r
- 'include_dirs': [\r
- '<(midl_out_dir)',\r
- ],\r
- 'msvs_settings': {\r
- 'VCMIDLTool': {\r
- 'OutputDirectory': '<(midl_out_dir)',\r
- 'HeaderFileName': '<(RULE_INPUT_ROOT).h',\r
- },\r
- },\r
- },\r
- ],\r
-}\r
+++ /dev/null
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
-\r
-import "oaidl.idl";\r
-import "ocidl.idl";\r
-\r
-[\r
- object,\r
- uuid(9C1100DD-51D4-4827-AE9F-3B8FAC4AED72),\r
- oleautomation,\r
- nonextensible,\r
- pointer_default(unique)\r
-]\r
-interface IChromeHistoryIndexer : IUnknown {\r
- HRESULT SomeFunction([in] VARIANT begin_time, [in] VARIANT end_time);\r
-};\r
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "history_indexer.h"
-
-// Use the thing in the IDL.
-int main() {
- IChromeHistoryIndexer** indexer = 0;
- IID fake_iid;
- CoCreateInstance(fake_iid, NULL, CLSCTX_INPROC,
- __uuidof(IChromeHistoryIndexer),
- reinterpret_cast<void**>(indexer));
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-__declspec(dllexport) void some_function() {
-}
-
-int main() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-__declspec(dllimport) void some_function();
-
-int main() {
- some_function();
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_importlib',
- 'type': 'shared_library',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '2',
- }
- },
- 'sources': ['has-exports.cc'],
- },
-
- {
- 'target_name': 'test_linkagainst',
- 'type': 'executable',
- 'dependencies': ['test_importlib'],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '2',
- }
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <winsock2.h>
-
-int main() {
- WSAStartup(0, 0);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_deps_none',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_deps_few',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'AdditionalDependencies': [
- 'wininet.lib',
- 'ws2_32.lib',
- ]
- }
- },
- 'sources': ['additional-deps.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.\r
-# Use of this source code is governed by a BSD-style license that can be\r
-# found in the LICENSE file.\r
-\r
-{\r
- 'targets': [\r
- {\r
- 'target_name': 'test_additional_none',\r
- 'type': 'executable',\r
- 'msvs_settings': {\r
- 'VCLinkerTool': {\r
- }\r
- },\r
- 'sources': ['hello.cc'],\r
- },\r
- {\r
- 'target_name': 'test_additional_few',\r
- 'type': 'executable',\r
- 'msvs_settings': {\r
- 'VCLinkerTool': {\r
- 'AdditionalOptions': [\r
- '/dynamicbase:no',\r
- ]\r
- }\r
- },\r
- 'sources': ['hello.cc'],\r
- },\r
- ]\r
-}\r
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_aslr_default',
- 'type': 'executable',
- 'msvs_settings': {
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_aslr_no',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'RandomizedBaseAddress': '1',
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_aslr_yes',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'RandomizedBaseAddress': '2',
- }
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_debug_off',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'false'
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_debug_on',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true'
- },
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <windows.h>
-#include <delayimp.h>
-#include <odbcinst.h>
-#include <shlobj.h>
-#include <sql.h>
-#include <stdio.h>
-
-// Reference something in each of the default-linked libraries to cause a link
-// error if one is not correctly included.
-
-extern "C" void* __puiHead; // DelayImp
-
-int main() {
- CopyFile(0, 0, 0); // kernel32
- MessageBox(0, 0, 0, 0); // user32
- CreateDC(0, 0, 0, 0); // gdi32
- AddPrinter(0, 0, 0); // winspool
- FindText(0); // comdlg32
- ClearEventLog(0, 0); // advapi32
- SHGetSettings(0, 0); // shell32
- OleFlushClipboard(); // ole32
- VarAdd(0, 0, 0); // oleaut32
- printf("%p", &CLSID_FileOpenDialog); // uuid
- SQLAllocHandle(0, 0, 0); // odbc32
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_default',
- 'type': 'executable',
- 'sources': ['default-libs.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_deffile_multiple_fail',
- 'type': 'shared_library',
- 'sources': [
- 'deffile.cc',
- 'deffile.def',
- 'deffile2.def',
- ],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-void AnExportedFunction() {
-}
-
-int main() {
- return 0;
-}
+++ /dev/null
-; Copyright (c) 2012 Google Inc. All rights reserved.
-; Use of this source code is governed by a BSD-style license that can be
-; found in the LICENSE file.
-
-LIBRARY test_deffile_ok
-
-EXPORTS
- AnExportedFunction
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_deffile_dll_ok',
- 'type': 'shared_library',
- 'sources': [
- 'deffile.cc',
- 'deffile.def',
- ],
- },
- {
- 'target_name': 'test_deffile_dll_notexported',
- 'type': 'shared_library',
- 'sources': [
- 'deffile.cc',
- ],
- },
- {
- 'target_name': 'test_deffile_exe_ok',
- 'type': 'executable',
- 'sources': [
- 'deffile.cc',
- 'deffile.def',
- ],
- },
- {
- 'target_name': 'test_deffile_exe_notexported',
- 'type': 'executable',
- 'sources': [
- 'deffile.cc',
- ],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_dld_none',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- }
- },
- 'sources': ['delay-load.cc'],
- },
- {
- 'target_name': 'test_dld_shell32',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'DelayLoadDLLs': ['shell32.dll']
- }
- },
- 'sources': ['delay-load.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <shlobj.h>
-
-int main() {
- SHCreateDirectory(0, 0);
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// The entry point specified by link.exe /ENTRY option.
-extern "C" void MainEntryPoint() {
-}
-
-// Still needed because the linker checks for existence of one of main, wmain,
-// WinMain, or wMain to offer informative diagnositics.
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_ok',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'EntryPointSymbol': 'MainEntryPoint',
- }
- },
- 'sources': ['entrypointsymbol.cc'],
- },
- {
- 'target_name': 'test_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'EntryPointSymbol': 'MainEntryPoint',
- }
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">\r
-\r
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">\r
- <application>\r
- <!--This Id value indicates the application supports Windows 7 functionality-->\r
- <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>\r
- </application>\r
- </compatibility>\r
- \r
-</assembly>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">\r
-\r
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">\r
- <application>\r
- <!--This Id value indicates the application supports Windows Vista functionality -->\r
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>\r
- </application>\r
- </compatibility>\r
- \r
-</assembly>\r
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Disable DYNAMICBASE for these tests because it implies/doesn't imply
- # FIXED in certain cases so it complicates the test for FIXED.
- {
- 'target_name': 'test_fixed_default_exe',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'RandomizedBaseAddress': '1',
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_fixed_default_dll',
- 'type': 'shared_library',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'RandomizedBaseAddress': '1',
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_fixed_no',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'FixedBaseAddress': '1',
- 'RandomizedBaseAddress': '1',
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_fixed_yes',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'FixedBaseAddress': '2',
- 'RandomizedBaseAddress': '1',
- },
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.\r
-# Use of this source code is governed by a BSD-style license that can be\r
-# found in the LICENSE file.\r
-\r
-{\r
- 'targets': [\r
- {\r
- 'target_name': 'test_manifest_exe',\r
- 'type': 'executable',\r
- 'sources': ['hello.cc'],\r
- 'msvs_settings': {\r
- 'VCManifestTool': {\r
- 'EmbedManifest': 'false',\r
- }\r
- },\r
- },\r
- {\r
- 'target_name': 'test_manifest_dll',\r
- 'type': 'shared_library',\r
- 'sources': ['hello.cc'],\r
- 'msvs_settings': {\r
- 'VCManifestTool': {\r
- 'EmbedManifest': 'false',\r
- }\r
- },\r
- },\r
- {\r
- 'target_name': 'test_manifest_extra1',\r
- 'type': 'executable',\r
- 'sources': ['hello.cc'],\r
- 'msvs_settings': {\r
- 'VCManifestTool': {\r
- 'EmbedManifest': 'false',\r
- 'AdditionalManifestFiles': 'extra.manifest',\r
- }\r
- },\r
- },\r
- {\r
- 'target_name': 'test_manifest_extra2',\r
- 'type': 'executable',\r
- 'sources': ['hello.cc'],\r
- 'msvs_settings': {\r
- 'VCManifestTool': {\r
- 'EmbedManifest': 'false',\r
- 'AdditionalManifestFiles': 'extra.manifest;extra2.manifest',\r
- }\r
- },\r
- },\r
- {\r
- 'target_name': 'test_manifest_extra_list',\r
- 'type': 'executable',\r
- 'sources': ['hello.cc'],\r
- 'msvs_settings': {\r
- 'VCManifestTool': {\r
- 'EmbedManifest': 'false',\r
- 'AdditionalManifestFiles': [\r
- 'extra.manifest',\r
- 'extra2.manifest'\r
- ],\r
- }\r
- },\r
- },\r
- ]\r
-}\r
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Turn on debug information so the incremental linking tables have a
- # visible symbolic name in the disassembly.
- {
- 'target_name': 'test_incremental_unset',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_incremental_default',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'LinkIncremental': '0',
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_incremental_no',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'LinkIncremental': '1',
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_incremental_yes',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'LinkIncremental': '2',
- }
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <winsock2.h>
-
-int main() {
- WSAStartup(0, 0);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_adjust',
- 'type': 'executable',
- 'libraries': [
- '-lws2_32.lib'
- ],
- 'sources': ['library-adjust.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int library_function() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-extern int library_function();
-
-int main() {
- library_function();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_libdirs_none',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'AdditionalDependencies': [
- 'test_lib.lib',
- ],
- },
- },
- 'sources': ['library-directories-reference.cc'],
- },
- {
- 'target_name': 'test_libdirs_with',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- # NOTE: Don't use this for general dependencies between gyp
- # libraries (use 'dependencies' instead). This is done here only for
- # testing.
- #
- # This setting should only be used to depend on third party prebuilt
- # libraries that are stored as binaries at a known location.
- 'AdditionalLibraryDirectories': [
- '<(DEPTH)/out/Default/obj/subdir', # ninja style
- '<(DEPTH)/subdir/Default/lib', # msvs style
- ],
- 'AdditionalDependencies': [
- 'test_lib.lib',
- ],
- },
- },
- 'sources': ['library-directories-reference.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Include entry point function that's excluded by removing C runtime libraries.
-extern "C" void mainCRTStartup() {
-}
-
-// Still needed because the linker checks for existence of one of main, wmain,
-// WinMain, or wMain to offer informative diagnositics.
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_ok',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'IgnoreDefaultLibraryNames':
- ['libcmtd.lib', 'libcmt.lib', 'msvcrt.lib', 'msvcrtd.lib'],
- }
- },
- 'sources': ['nodefaultlib.cc'],
- },
- {
- 'target_name': 'test_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'IgnoreDefaultLibraryNames':
- ['libcmtd.lib', 'libcmt.lib', 'msvcrt.lib', 'msvcrtd.lib'],
- }
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_nxcompat_default',
- 'type': 'executable',
- 'msvs_settings': {
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_nxcompat_no',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'DataExecutionPrevention': '1',
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_nxcompat_yes',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'DataExecutionPrevention': '2',
- },
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-void similar_function0(char* x) {
- while (*x) {
- ++x;
- }
-}
-
-void similar_function1(char* p) {
- while (*p) {
- ++p;
- }
-}
-
-void similar_function2(char* q) {
- while (*q) {
- ++q;
- }
-}
-
-int main() {
- char* x = "hello";
- similar_function0(x);
- similar_function1(x);
- similar_function2(x);
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Have to turn on function level linking here to get the function packaged
- # as a COMDAT so that it's eligible for merging. Also turn on debug
- # information so that the symbol names for the code appear in the dump.
- # Finally, specify non-incremental linking so that there's not a bunch of
- # extra "similar_function"s in the output (the ILT jump table).
- {
- 'target_name': 'test_opticf_default',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnableFunctionLevelLinking': 'true',
- 'DebugInformationFormat': '3',
- 'Optimization': '0',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'LinkIncremental': '1',
- },
- },
- 'sources': ['opt-icf.cc'],
- },
- {
- 'target_name': 'test_opticf_no',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnableFunctionLevelLinking': 'true',
- 'DebugInformationFormat': '3',
- 'Optimization': '0',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'EnableCOMDATFolding': '1',
- 'LinkIncremental': '1',
- },
- },
- 'sources': ['opt-icf.cc'],
- },
- {
- 'target_name': 'test_opticf_yes',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnableFunctionLevelLinking': 'true',
- 'DebugInformationFormat': '3',
- 'Optimization': '0',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'EnableCOMDATFolding': '2',
- 'LinkIncremental': '1',
- },
- },
- 'sources': ['opt-icf.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int unused_function() {
- return 0;
-}
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Have to turn on function level linking here to get the function packaged
- # as a COMDAT so that it's eligible for optimizing away. Also turn on
- # debug information so that the symbol names for the code appear in the
- # dump (so we can verify if they are included in the final exe).
- {
- 'target_name': 'test_optref_default',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnableFunctionLevelLinking': 'true',
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- },
- 'sources': ['opt-ref.cc'],
- },
- {
- 'target_name': 'test_optref_no',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnableFunctionLevelLinking': 'true',
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'OptimizeReferences': '1',
- },
- },
- 'sources': ['opt-ref.cc'],
- },
- {
- 'target_name': 'test_optref_yes',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'EnableFunctionLevelLinking': 'true',
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'OptimizeReferences': '2',
- },
- },
- 'sources': ['opt-ref.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_output_exe',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '$(OutDir)\\blorp.exe'
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_output_exe2',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '$(OutDir)\\subdir\\blorp.exe'
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_output_dll',
- 'type': 'shared_library',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '$(OutDir)\\blorp.dll'
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_output_lib',
- 'type': 'static_library',
- 'msvs_settings': {
- 'VCLibrarianTool': {
- 'OutputFile': '$(OutDir)\\blorp.lib'
- },
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_output_lib2',
- 'type': 'static_library',
- 'msvs_settings': {
- 'VCLibrarianTool': {
- 'OutputFile': '$(OutDir)\\subdir\\blorp.lib'
- },
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Verify that 'Profile' option correctly makes it to LINK steup in Ninja
- {
- 'target_name': 'test_profile_true',
- 'type': 'executable',
- 'sources': ['hello.cc'],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3'
- },
- 'VCLinkerTool': {
- 'Profile': 'true',
- 'GenerateDebugInformation': 'true',
- },
- },
- },
- {
- 'target_name': 'test_profile_false',
- 'type': 'executable',
- 'sources': ['hello.cc'],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3'
- },
- 'VCLinkerTool': {
- 'Profile': 'false',
- 'GenerateDebugInformation': 'true',
- },
- },
- },
- {
- 'target_name': 'test_profile_default',
- 'type': 'executable',
- 'sources': ['hello.cc'],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3'
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- },
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- # Verify that 'ProgramDataBase' option correctly makes it to LINK step in Ninja
- {
- # Verify that VC macros and windows paths work correctly
- 'target_name': 'test_pdb_outdir',
- 'type': 'executable',
- 'sources': ['hello.cc'],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3'
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'ProgramDatabaseFile': '$(OutDir)\\name_outdir.pdb',
- },
- },
- },
- {
- # Verify that GYP macros and POSIX paths work correctly
- 'target_name': 'test_pdb_proddir',
- 'type': 'executable',
- 'sources': ['hello.cc'],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3'
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'ProgramDatabaseFile': '<(PRODUCT_DIR)/name_proddir.pdb',
- },
- },
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.\r
-# Use of this source code is governed by a BSD-style license that can be\r
-# found in the LICENSE file.\r
-\r
-{\r
- 'targets': [\r
- {\r
- 'target_name': 'test_lib',\r
- 'type': 'static_library',\r
- 'sources': ['../library-directories-define.cc'],\r
- },\r
- ]\r
-}\r
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <windows.h>
-
-int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_console_ok',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'SubSystem': '1'
- }
- },
- 'sources': ['hello.cc'],
- },
- {
- 'target_name': 'test_console_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'SubSystem': '1'
- }
- },
- 'sources': ['subsystem-windows.cc'],
- },
- {
- 'target_name': 'test_windows_ok',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'SubSystem': '2'
- }
- },
- 'sources': ['subsystem-windows.cc'],
- },
- {
- 'target_name': 'test_windows_fail',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'SubSystem': '2'
- }
- },
- 'sources': ['hello.cc'],
- },
- ]
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int func() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'longexe',
- 'type': 'executable',
- 'msvs_settings': {
- # Use this as a simple way to get a long command.
- 'VCCLCompilerTool': {
- 'AdditionalOptions': '/nologo ' * 8000,
- },
- 'VCLinkerTool': {
- 'AdditionalOptions': '/nologo ' * 8000,
- },
- },
- 'sources': [
- 'hello.cc',
- ],
- },
- {
- 'target_name': 'longlib',
- 'type': 'static_library',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'AdditionalOptions': '/nologo ' * 8000,
- },
- 'VCLibrarianTool': {
- 'AdditionalOptions': '/nologo ' * 8000,
- },
- },
- 'sources': [
- 'function.cc',
- ],
- },
- {
- 'target_name': 'longdll',
- 'type': 'shared_library',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'AdditionalOptions': '/nologo ' * 8000,
- },
- 'VCLinkerTool': {
- 'AdditionalOptions': '/nologo ' * 8000,
- },
- },
- 'sources': [
- 'hello.cc',
- ],
- },
- ]
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-Verifies that precompiled headers can be specified.
-"""
-
-import TestGyp
-
-import sys
-
-if sys.platform == 'win32':
- test = TestGyp.TestGyp(formats=['msvs', 'ninja'], workdir='workarea_all')
- test.run_gyp('hello.gyp')
- test.build('hello.gyp', 'hello')
- test.run_built_executable('hello', stdout="Hello, world!\nHello, two!\n")
- test.up_to_date('hello.gyp', test.ALL)
- test.pass_test()
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-// Note the abscence of a stdio.h include. This will be inserted because of the
-// precompiled header.
-
-extern int hello2();
-
-int main(int argc, char *argv[]) {
- printf("Hello, world!\n");
- hello2();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'hello',
- 'type': 'executable',
- 'sources': [
- 'hello.c',
- 'hello2.c',
- 'precomp.c',
- ],
- 'msvs_precompiled_header': 'stdio.h',
- 'msvs_precompiled_source': 'precomp.c',
-
- # Required so that the printf actually causes a build failure
- # if the pch isn't included.
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarningLevel': '3',
- 'WarnAsError': 'true',
- },
- },
- },
- ],
-}
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-// Unlike hello.c, this file specifies the headers.
-
-#include <windows.h>
-#include <stdio.h>
-
-int hello2() {
- printf("Hello, two!\n");
- return 0;
-}
+++ /dev/null
-/* Copyright (c) 2011 Google Inc. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-// The precompiled header does not have to be the first one in the file.
-
-#include <windows.h>
-#include <stdio.h>
+++ /dev/null
-//{{NO_DEPENDENCIES}}\r
-// Microsoft Visual C++ generated include file.\r
-// Used by hello.rc\r
-//\r
-\r
-#define IDS_APP_TITLE 103\r
-\r
-#define IDR_MAINFRAME 128\r
-#define IDI_HELLO 107\r
-#define IDI_SMALL 108\r
-#define IDC_HELLO 109\r
-#ifndef IDC_STATIC\r
-#define IDC_STATIC -1\r
-#endif\r
-// Next default values for new objects\r
-//\r
-#ifdef APSTUDIO_INVOKED\r
-#ifndef APSTUDIO_READONLY_SYMBOLS\r
-\r
-#define _APS_NO_MFC 130\r
-#define _APS_NEXT_RESOURCE_VALUE 129\r
-#define _APS_NEXT_COMMAND_VALUE 32771\r
-#define _APS_NEXT_CONTROL_VALUE 1000\r
-#define _APS_NEXT_SYMED_VALUE 110\r
-#endif\r
-#endif\r
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
-\r
-#define WIN32_LEAN_AND_MEAN\r
-#include <windows.h>\r
-#include <tchar.h>\r
-\r
-#include "resource.h"\r
-\r
-#define MAX_LOADSTRING 100\r
-\r
-TCHAR szTitle[MAX_LOADSTRING];\r
-TCHAR szWindowClass[MAX_LOADSTRING];\r
-\r
-int APIENTRY _tWinMain(\r
- HINSTANCE hInstance,\r
- HINSTANCE hPrevInstance,\r
- LPTSTR lpCmdLine,\r
- int nCmdShow) {\r
- // Make sure we can load some resources.\r
- int count = 0;\r
- LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);\r
- if (szTitle[0] != 0) ++count;\r
- LoadString(hInstance, IDC_HELLO, szWindowClass, MAX_LOADSTRING);\r
- if (szWindowClass[0] != 0) ++count;\r
- if (LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SMALL)) != NULL) ++count;\r
- if (LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HELLO)) != NULL) ++count;\r
- return count;\r
-}\r
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'with_resources',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- 'VCResourceCompilerTool': {
- 'Culture' : '1033',
- },
- },
- 'sources': [
- 'hello.cpp',
- 'hello.rc',
- ],
- },
- {
- 'target_name': 'with_resources_subdir',
- 'type': 'executable',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'DebugInformationFormat': '3',
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- },
- 'VCResourceCompilerTool': {
- 'Culture' : '1033',
- },
- },
- 'sources': [
- 'hello.cpp',
- 'subdir/hello2.rc',
- ],
- },
- {
- 'target_name': 'resource_only_dll',
- 'type': 'shared_library',
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'ResourceOnlyDLL': 'true',
- },
- },
- 'sources': [
- 'hello.rc',
- ],
- },
- ],
-}
+++ /dev/null
-#pragma once\r
-\r
-#include "resource.h"\r
+++ /dev/null
-//Microsoft Visual C++ generated resource script.\r
-//\r
-#include "resource.h"\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#ifndef APSTUDIO_INVOKED\r
-#include "targetver.h"\r
-#endif\r
-#define APSTUDIO_HIDDEN_SYMBOLS\r
-#include "windows.h"\r
-#undef APSTUDIO_HIDDEN_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-LANGUAGE 9, 1\r
-#pragma code_page(932)\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Icon\r
-//\r
-\r
-// Icon with lowest ID value placed first to ensure application icon\r
-// remains consistent on all systems.\r
-\r
-IDI_HELLO ICON "hello.ico"\r
-IDI_SMALL ICON "small.ico"\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-1 TEXTINCLUDE\r
-BEGIN\r
- "resource.h\0"\r
-END\r
-\r
-2 TEXTINCLUDE\r
-BEGIN\r
- "#ifndef APSTUDIO_INVOKED\r\n"\r
- "#include ""targetver.h""\r\n"\r
- "#endif\r\n"\r
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
- "#include ""windows.h""\r\n"\r
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
- "\0"\r
-END\r
-\r
-3 TEXTINCLUDE\r
-BEGIN\r
- "\r\n"\r
- "\0"\r
-END\r
-\r
-#endif // APSTUDIO_INVOKED\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// String Table\r
-//\r
-\r
-STRINGTABLE\r
-BEGIN\r
- IDC_HELLO "HELLO"\r
- IDS_APP_TITLE "hello"\r
-END\r
-\r
-#endif\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif // not APSTUDIO_INVOKED\r
+++ /dev/null
-//Microsoft Visual C++ generated resource script.\r
-//\r
-#include "subdir/include.h"\r
-#include "resource.h"\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#ifndef APSTUDIO_INVOKED\r
-#include "targetver.h"\r
-#endif\r
-#define APSTUDIO_HIDDEN_SYMBOLS\r
-#include "windows.h"\r
-#undef APSTUDIO_HIDDEN_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-LANGUAGE 9, 1\r
-#pragma code_page(932)\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Icon\r
-//\r
-\r
-// Icon with lowest ID value placed first to ensure application icon\r
-// remains consistent on all systems.\r
-\r
-IDI_HELLO ICON "hello.ico"\r
-IDI_SMALL ICON "small.ico"\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-1 TEXTINCLUDE\r
-BEGIN\r
- "resource.h\0"\r
-END\r
-\r
-2 TEXTINCLUDE\r
-BEGIN\r
- "#ifndef APSTUDIO_INVOKED\r\n"\r
- "#include ""targetver.h""\r\n"\r
- "#endif\r\n"\r
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
- "#include ""windows.h""\r\n"\r
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
- "\0"\r
-END\r
-\r
-3 TEXTINCLUDE\r
-BEGIN\r
- "\r\n"\r
- "\0"\r
-END\r
-\r
-#endif // APSTUDIO_INVOKED\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// String Table\r
-//\r
-\r
-STRINGTABLE\r
-BEGIN\r
- IDC_HELLO "HELLO"\r
- IDS_APP_TITLE "hello"\r
-END\r
-\r
-#endif\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif // not APSTUDIO_INVOKED\r
+++ /dev/null
-// Just exists to make sure it can be included.\r
+++ /dev/null
-#pragma once\r
-\r
-// The following macros define the minimum required platform. The minimum required platform\r
-// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run \r
-// your application. The macros work by enabling all features available on platform versions up to and \r
-// including the version specified.\r
-\r
-// Modify the following defines if you have to target a platform prior to the ones specified below.\r
-// Refer to MSDN for the latest info on corresponding values for different platforms.\r
-#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.\r
-#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.\r
-#endif\r
-\r
-#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.\r
-#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.\r
-#endif\r
-\r
-#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.\r
-#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.\r
-#endif\r
-\r
-#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.\r
-#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.\r
-#endif\r
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int some_function() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int some_function() {
- return 0;
-}
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-extern int some_function();
-
-int main() {
- some_function();
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'lib1',
- 'type': 'static_library',
- 'sources': ['a.cc'],
- },
- {
- 'target_name': 'final_uldi',
- 'type': 'executable',
- 'dependencies': [
- 'lib1',
- 'lib2',
- ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'UseLibraryDependencyInputs': 'true'
- },
- },
- 'sources': ['main.cc'],
- },
- {
- 'target_name': 'final_no_uldi',
- 'type': 'executable',
- 'dependencies': [
- 'lib1',
- 'lib2',
- ],
- 'sources': ['main.cc'],
- },
- {
- 'target_name': 'lib2',
- 'type': 'static_library',
- # b.cc has the same named function as a.cc, but don't use the same name
- # so that the .obj will have a different name. If the obj file has the
- # same name, the linker will discard the obj file, invalidating the
- # test.
- 'sources': ['b.cc'],
- },
- ]
-}
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from optparse import OptionParser
-
-parser = OptionParser()
-parser.add_option('-a', dest='platform')
-parser.add_option('-o', dest='output')
-parser.add_option('-p', dest='path')
-(options, args) = parser.parse_args()
-
-f = open(options.output, 'w')
-print >>f, 'options', options
-print >>f, 'args', args
-f.close()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_expansions',
- 'msvs_cygwin_shell': 0,
- 'type': 'none',
- 'rules': [
- {
- 'rule_name': 'assembler (gnu-compatible)',
- 'msvs_cygwin_shell': 0,
- 'msvs_quote_cmd': 0,
- 'extension': 'S',
- 'inputs': [
- 'as.py',
- '$(InputPath)'
- ],
- 'outputs': [
- '$(IntDir)/$(InputName).obj',
- ],
- 'action':
- ['python',
- 'as.py',
- '-a', '$(PlatformName)',
- '-o', '$(IntDir)/$(InputName).obj',
- '-p', '<(DEPTH)',
- '$(InputPath)'],
- 'message': 'Building assembly language file $(InputPath)',
- 'process_outputs_as_sources': 1,
- },
- ],
- 'sources': [
- 'input.S',
- ],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-
-input = open(sys.argv[1], "r").read()
-open(sys.argv[2], "w").write(input + "Modified.")
+++ /dev/null
-// Copyright (c) 2012 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-int main() {
- return 0;
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_expansions',
- 'msvs_cygwin_shell': 0,
- 'type': 'none',
- 'rules': [
- {
- 'rule_name': 'generate_file',
- 'extension': 'blah',
- 'inputs': [
- '<(RULE_INPUT_PATH)',
- 'do_stuff.py',
- ],
- 'outputs': [
- '$(OutDir)\\<(RULE_INPUT_NAME).something',
- ],
- 'action': ['python',
- 'do_stuff.py',
- '<(RULE_INPUT_PATH)',
- '$(OutDir)\\<(RULE_INPUT_NAME).something',],
- },
- ],
- 'sources': [
- 'stuff.blah',
- ],
- },
- ]
-}
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_expansions',
- 'type': 'executable',
- 'sources': ['hello.cc'],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '$(OutDir)\\$(ProjectName)_plus_something.exe',
- },
- },
- },
- {
- 'target_name': 'test_with_product_name',
- 'product_name': 'prod_name',
- 'type': 'executable',
- 'sources': ['hello.cc'],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'OutputFile': '$(OutDir)\\$(ProjectName)_plus_something.exe',
- },
- },
- },
- ]
-}
+++ /dev/null
-Random data file.
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if not os.path.exists(sys.argv[1]):
- raise
-open(sys.argv[2], 'w').close()
+++ /dev/null
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'test_slash_trailing',
- 'type': 'none',
- 'msvs_cygwin_shell': '0',
- 'actions': [
- {
- 'action_name': 'root',
- 'inputs': [],
- 'outputs': ['out1'],
- 'action': ['python', 'test_exists.py', '$(VCInstallDir)', 'out1']
- },
- ],
- },
- {
- 'target_name': 'test_slash_dir',
- 'type': 'none',
- 'msvs_cygwin_shell': '0',
- 'actions': [
- {
- 'action_name': 'bin',
- 'inputs': [],
- 'outputs': ['out2'],
- 'action': ['python', 'test_exists.py', '$(VCInstallDir)bin', 'out2'],
- },
- {
- 'action_name': 'compiler',
- 'inputs': [],
- 'outputs': ['out3'],
- 'action': [
- 'python', 'test_exists.py', '$(VCInstallDir)bin\\cl.exe', 'out3'],
- },
- ],
- },
- ]
-}
+++ /dev/null
-{
- 'variables': {
- 'strict_aliasing%': 'false', # turn on/off -fstrict-aliasing
- 'visibility%': 'hidden', # V8's visibility setting
- 'target_arch%': 'ia32', # set v8's target architecture
- 'host_arch%': 'ia32', # set v8's host architecture
- 'want_separate_host_toolset': 0, # V8 should not build target and host
- 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
- 'component%': 'static_library', # NB. these names match with what V8 expects
- 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
-
- # Enable V8's post-mortem debugging only on unix flavors.
- 'conditions': [
- ['OS != "win"', {
- 'v8_postmortem_support': 'true'
- }]
- ],
- },
-
- 'target_defaults': {
- 'default_configuration': 'Release',
- 'configurations': {
- 'Debug': {
- 'defines': [ 'DEBUG', '_DEBUG' ],
- 'cflags': [ '-g', '-O0' ],
- 'conditions': [
- ['target_arch=="x64"', {
- 'msvs_configuration_platform': 'x64',
- }],
- ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'RuntimeLibrary': 1, # static debug
- 'Optimization': 0, # /Od, no optimization
- 'MinimalRebuild': 'false',
- 'OmitFramePointers': 'false',
- 'BasicRuntimeChecks': 3, # /RTC1
- },
- 'VCLinkerTool': {
- 'LinkIncremental': 2, # enable incremental linking
- },
- },
- },
- 'Release': {
- 'cflags': [ '-O3', '-fdata-sections', '-ffunction-sections' ],
- 'conditions': [
- ['target_arch=="x64"', {
- 'msvs_configuration_platform': 'x64',
- }],
- ['OS=="solaris"', {
- 'cflags': [ '-fno-omit-frame-pointer' ],
- # pull in V8's postmortem metadata
- 'ldflags': [ '-Wl,-z,allextract' ]
- }],
- ['strict_aliasing!="true"', {
- 'cflags': [ '-fno-strict-aliasing' ],
- }],
- ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'RuntimeLibrary': 0, # static release
- 'Optimization': 3, # /Ox, full optimization
- 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
- 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
- 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
- 'OmitFramePointers': 'true',
- 'EnableFunctionLevelLinking': 'true',
- 'EnableIntrinsicFunctions': 'true',
- 'RuntimeTypeInfo': 'false',
- 'ExceptionHandling': '0',
- 'AdditionalOptions': [
- '/MP', # compile across multiple CPUs
- ],
- },
- 'VCLibrarianTool': {
- 'AdditionalOptions': [
- '/LTCG', # link time code generation
- ],
- },
- 'VCLinkerTool': {
- 'LinkTimeCodeGeneration': 1, # link-time code generation
- 'OptimizeReferences': 2, # /OPT:REF
- 'EnableCOMDATFolding': 2, # /OPT:ICF
- 'LinkIncremental': 1, # disable incremental linking
- },
- },
- }
- },
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'StringPooling': 'true', # pool string literals
- 'DebugInformationFormat': 3, # Generate a PDB
- 'WarningLevel': 3,
- 'BufferSecurityCheck': 'true',
- 'ExceptionHandling': 1, # /EHsc
- 'SuppressStartupBanner': 'true',
- 'WarnAsError': 'false',
- },
- 'VCLibrarianTool': {
- },
- 'VCLinkerTool': {
- 'conditions': [
- ['target_arch=="x64"', {
- 'TargetMachine' : 17 # /MACHINE:X64
- }],
- ],
- 'GenerateDebugInformation': 'true',
- 'RandomizedBaseAddress': 2, # enable ASLR
- 'DataExecutionPrevention': 2, # enable DEP
- 'AllowIsolation': 'true',
- 'SuppressStartupBanner': 'true',
- 'target_conditions': [
- ['_type=="executable"', {
- 'SubSystem': 1, # console executable
- }],
- ],
- },
- },
- 'conditions': [
- ['OS == "win"', {
- 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
- 'defines': [
- 'WIN32',
- # we don't really want VC++ warning us about
- # how dangerous C functions are...
- '_CRT_SECURE_NO_DEPRECATE',
- # ... or that C implementations shouldn't use
- # POSIX names
- '_CRT_NONSTDC_NO_DEPRECATE',
- 'BUILDING_V8_SHARED=1',
- 'BUILDING_UV_SHARED=1',
- ],
- }, {
- 'defines': [
- '_LARGEFILE_SOURCE',
- '_FILE_OFFSET_BITS=64',
- ],
- }],
- [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
- 'cflags': [ '-Wall', '-pthread', ],
- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
- 'ldflags': [ '-pthread', ],
- 'conditions': [
- [ 'target_arch=="ia32"', {
- 'cflags': [ '-m32' ],
- 'ldflags': [ '-m32' ],
- }],
- [ 'target_arch=="x64"', {
- 'cflags': [ '-m64' ],
- 'ldflags': [ '-m64' ],
- }],
- [ 'OS=="linux"', {
- 'ldflags': [ '-rdynamic' ],
- }],
- [ 'OS=="solaris"', {
- 'cflags': [ '-pthreads' ],
- 'ldflags': [ '-pthreads' ],
- 'cflags!': [ '-pthread' ],
- 'ldflags!': [ '-pthread' ],
- }],
- ],
- }],
- ['OS=="mac"', {
- 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
- 'xcode_settings': {
- 'ALWAYS_SEARCH_USER_PATHS': 'NO',
- 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
- 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
- # (Equivalent to -fPIC)
- 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
- 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
- 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
- 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
- 'GCC_VERSION': '4.2',
- 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
- 'PREBINDING': 'NO', # No -Wl,-prebind
- 'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5
- 'USE_HEADERMAP': 'NO',
- 'OTHER_CFLAGS': [
- '-fno-strict-aliasing',
- ],
- 'WARNING_CFLAGS': [
- '-Wall',
- '-Wendif-labels',
- '-W',
- '-Wno-unused-parameter',
- ],
- },
- 'target_conditions': [
- ['_type!="static_library"', {
- 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
- }],
- ],
- 'conditions': [
- ['target_arch=="ia32"', {
- 'xcode_settings': {'ARCHS': ['i386']},
- }],
- ['target_arch=="x64"', {
- 'xcode_settings': {'ARCHS': ['x86_64']},
- }],
- ],
- }],
- ],
- }
-}
return callback(new Error('Invalid version number: ' + versionStr))
}
- // "legacy" versions are 0.7 and 0.6
- var isLegacy = semver.lt(versionStr, '0.8.0')
- log.verbose('installing legacy version?', isLegacy)
-
- if (semver.lt(versionStr, '0.6.0')) {
- return callback(new Error('Minimum target version is `0.6.0` or greater. Got: ' + versionStr))
+ if (semver.lt(versionStr, '0.8.0')) {
+ return callback(new Error('Minimum target version is `0.8.0` or greater. Got: ' + versionStr))
}
// 0.x.y-pre versions are not published yet and cannot be installed. Bail.
- if (version[5] && version[5].match(/\-pre$/)) {
+ if (version.prerelease[0] === 'pre') {
log.verbose('detected "pre" node version', versionStr)
if (gyp.opts.nodedir) {
log.verbose('--nodedir flag was passed; skipping install', gyp.opts.nodedir)
}
// flatten version into String
- version = version.slice(1, 4).join('.')
+ version = version.version
log.verbose('install', 'installing version: %s', version)
// the directory where the dev files will be installed
log.verbose('tarball', 'done parsing tarball')
var async = 0
- if (isLegacy) {
- // copy over the files from the `legacy` dir
- async++
- copyLegacy(deref)
- }
-
if (win) {
// need to download node.lib
async++
}
}
- function copyLegacy (done) {
- // legacy versions of node (< 0.8) require the legacy files to be copied
- // over since they contain many bugfixes from the current node build system
- log.verbose('legacy', 'copying "legacy" gyp configuration files for version', version)
-
- var legacyDir = path.resolve(__dirname, '..', 'legacy')
- log.verbose('legacy', 'using "legacy" dir', legacyDir)
- log.verbose('legacy', 'copying to "dev" dir', devDir)
-
- var reader = fstream.Reader({ path: legacyDir, type: 'Directory' })
- var writer = fstream.Writer({ path: devDir, type: 'Directory' })
-
- reader.on('entry', function onEntry (entry) {
- log.verbose('legacy', 'reading entry:', entry.path)
- entry.on('entry', onEntry)
- })
-
- reader.on('error', done)
- writer.on('error', done)
-
- // Like `cp -rpf`
- reader.pipe(writer)
-
- reader.on('end', done)
- }
-
function downloadNodeLib (done) {
log.verbose('on Windows; need to download `node.lib`...')
var dir32 = path.resolve(devDir, 'ia32')
function valid (file) {
// header files
return minimatch(file, '*.h', { matchBase: true }) ||
- // non-legacy versions of node also extract the gyp build files
- (!isLegacy && minimatch(file, '*.gypi', { matchBase: true }))
+ minimatch(file, '*.gypi', { matchBase: true })
}
/**
}
}
-
-
-install.trim = function trim (file) {
- var firstSlash = file.indexOf('/')
- return file.substring(firstSlash + 1)
-}
+/**
+ * Module exports.
+ */
+
module.exports = exports = gyp
/**
*/
function gyp () {
- return new Gyp
+ return new Gyp()
}
function Gyp () {
// TODO: make this *more* configurable?
// see: https://github.com/TooTallNate/node-gyp/issues/21
var homeDir = process.env.HOME || process.env.USERPROFILE
+ if (!homeDir) {
+ throw new Error(
+ "node-gyp requires that the user's home directory is specified " +
+ "in either of the environmental variables HOME or USERPROFILE"
+ );
+ }
this.devDir = path.resolve(homeDir, '.node-gyp')
this.commands = {}
var commands = this.todo = []
// create a copy of the argv array with aliases mapped
- var argv = this.argv.map(function (arg) {
+ argv = this.argv.map(function (arg) {
// is this an alias?
if (arg in this.aliases) {
arg = this.aliases[arg]
*/
proto.spawn = function spawn (command, args, opts) {
- opts || (opts = {})
+ if (!opts) opts = {}
if (!opts.silent && !opts.customFds) {
opts.customFds = [ 0, 1, 2 ]
}
*/
proto.usage = function usage () {
- var usage = [
+ var str = [
''
, ' Usage: node-gyp <command> [options]'
, ''
, 'node-gyp@' + this.version + ' ' + path.resolve(__dirname, '..')
, 'node@' + process.versions.node
].join('\n')
- return usage
+ return str
}
/**
"bindings",
"gyp"
],
- "version": "0.10.0",
+ "version": "0.10.2",
"installVersion": 9,
"author": {
"name": "Nathan Rajlich",
"osenv": "0",
"request": "2",
"rimraf": "2",
- "semver": "1",
+ "semver": "~2.0.7",
"tar": "0",
"which": "1"
},
"engines": {
"node": ">= 0.8.0"
},
- "readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.3`][windows-python-v2.7.3] recommended, `v3.x.x` is __*not*__ supported)\n * Windows XP/Vista/7:\n * Microsoft Visual Studio C++ 2010 ([Express][msvc2010] version works well)\n * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk]\n * If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first.\n * If you get errors that the 64-bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1]\n * Windows 7/8:\n * Microsoft Visual Studio C++ 2012 for Windows Desktop ([Express][msvc2012] version works well)\n\nNote that OS X is just a flavour of Unix and so needs `python`, `make`, and C/C++.\nAn easy way to obtain these is to install XCode from Apple,\nand then use it to install the command line tools (under Preferences -> Downloads).\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` python\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download\n[msvc2010]: http://go.microsoft.com/?linkid=9709949\n[msvc2012]: http://go.microsoft.com/?linkid=9816758\n[win7sdk]: http://www.microsoft.com/en-us/download/details.aspx?id=8279\n[compiler update for the Windows SDK 7.1]: http://www.microsoft.com/en-us/download/details.aspx?id=4422\n",
+ "readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.8`, `0.9`, `0.10`, ..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.3`][windows-python-v2.7.3] recommended, `v3.x.x` is __*not*__ supported)\n * Windows XP/Vista/7:\n * Microsoft Visual Studio C++ 2010 ([Express][msvc2010] version works well)\n * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk]\n * If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first.\n * If you get errors that the 64-bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1]\n * Windows 7/8:\n * Microsoft Visual Studio C++ 2012 for Windows Desktop ([Express][msvc2012] version works well)\n\nNote that OS X is just a flavour of Unix and so needs `python`, `make`, and C/C++.\nAn easy way to obtain these is to install XCode from Apple,\nand then use it to install the command line tools (under Preferences -> Downloads).\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` python\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download\n[msvc2010]: http://go.microsoft.com/?linkid=9709949\n[msvc2012]: http://go.microsoft.com/?linkid=9816758\n[win7sdk]: http://www.microsoft.com/en-us/download/details.aspx?id=8279\n[compiler update for the Windows SDK 7.1]: http://www.microsoft.com/en-us/download/details.aspx?id=4422\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/TooTallNate/node-gyp/issues"
},
- "_id": "node-gyp@0.10.0",
- "dist": {
- "shasum": "23748ceb4b7681493a4a353ce605cc22ecd6ee67"
- },
- "_from": "node-gyp@latest",
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-0.10.0.tgz"
+ "_id": "node-gyp@0.10.2",
+ "_from": "node-gyp@latest"
}
+++ /dev/null
-/node_modules/
\ No newline at end of file
+++ /dev/null
-language: node_js
-node_js:
- - "0.10"
- - "0.8"
\ No newline at end of file
+++ /dev/null
-# Names sorted by how much code was originally theirs.
-Isaac Z. Schlueter <i@izs.me>
-Meryn Stol <merynstol@gmail.com>
\ No newline at end of file
+++ /dev/null
-This package contains code originally written by Isaac Z. Schlueter.
-Used with permission.
-
-Copyright (c) Meryn Stol ("Author")
-All rights reserved.
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+++ /dev/null
-# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)
-
-normalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.
-
-normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.
-
-## Installation
-
-```
-npm install normalize-package-data
-```
-
-## Usage
-
-Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.
-
-```javascript
-normalizeData = require('normalize-package-data')
-packageData = fs.readfileSync("package.json")
-normalizeData(packageData)
-// packageData is now normalized
-```
-
-Optionally, you may pass a "warning" function. It gets called whenever the normalizeData function encounters something that doesn't look right. It indicates less than perfect input data.
-
-```javascript
-normalizeData = require('normalize-package-data')
-packageData = fs.readfileSync("package.json")
-warnFn = function(msg) { console.error(msg) }
-normalizeData(packageData, warnFn)
-// packageData is now normalized. Any number of warnings may have been logged.
-```
-
-If you don't provide a warning function, `normalizeData` functions silently.
-
-### Potential exceptions
-
-If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.
-
-## What normalization (currently) entails
-
-* The value of `name` field gets trimmed.
-* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).
-* If `name` and/or `version` fields are missing, they are set to empty strings.
-* If `files` field is not an array, it will be removed.
-* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.
-* If `man` field is a string, it will become an array with the original string as its sole member.
-* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`.
-* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.
-* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.
-* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.
-* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.
-* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.
-* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`.
-* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.
-* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
-* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.
-* If `homepage` field is not a string, it will be removed.
-* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.
-
-### Rules for name field
-
-If `name` field is given, the value of the name field must be a string. The string may not:
-
-* start with a period.
-* contain the following characters: `/@\s+%`
-* contain and characters that would need to be encoded for use in urls.
-* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).
-
-### Rules for version field
-
-If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).
-
-## Credits
-
-This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.
-
-## License
-
-normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT).
-Copyright (c) 2013 Meryn Stol
\ No newline at end of file
+++ /dev/null
-module.exports = extractDescription
-
-// Extracts description from contents of a readme file in markdown format
-function extractDescription (d) {
- if (!d) return;
- // the first block of text before the first heading
- // that isn't the first line heading
- d = d.trim().split('\n')
- for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++);
- var l = d.length
- for (var e = s + 1; e < l && d[e].trim(); e ++);
- return d.slice(s, e).join(' ').trim()
-}
+++ /dev/null
-var semver = require("semver")
-var parseGitHubURL = require("github-url-from-git")
-var depTypes = ["dependencies","devDependencies","optionalDependencies"]
-var extractDescription = require("./extract_description")
-var url = require("url")
-
-var fixer = module.exports = {
- fixRepositoryField: function(data) {
- if (data.repositories) {
- this.warn("'repositories' (plural) Not supported.\n" +
- "Please pick one as the 'repository' field");
- data.repository = data.repositories[0]
- }
- if (!data.repository) return;
- if (typeof data.repository === "string") {
- data.repository = {
- type: "git",
- url: data.repository
- }
- }
- var r = data.repository.url || ""
- if (r) {
- var ghurl = parseGitHubURL(r)
- if (ghurl) {
- r = ghurl.replace(/^https?:\/\//, 'git://')
- }
- }
-
- if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) {
- this.warn("Probably broken git url: " + r)
- }
- }
-
-, fixFilesField: function(data) {
- var files = data.files
- if (files && !Array.isArray(files)) {
- this.warn("Invalid 'files' member")
- delete data.files
- }
- }
-
-, fixBinField: function(data) {
- if (!data.bin) return;
- if (typeof data.bin === "string") {
- var b = {}
- b[data.name] = data.bin
- data.bin = b
- }
- }
-
-, fixManField: function(data) {
- if (!data.man) return;
- if (typeof data.man === "string") {
- data.man = [ data.man ]
- }
- }
-, fixBundleDependenciesField: function(data) {
- var bdd = "bundledDependencies"
- var bd = "bundleDependencies"
- if (data[bdd] && !data[bd]) {
- data[bd] = data[bdd]
- delete data[bdd]
- }
- }
-
-, fixDependencies: function(data) {
- objectifyDeps(data, this.warn)
- addOptionalDepsToDeps(data, this.warn)
- this.fixBundleDependenciesField(data)
- }
-
-, fixKeywordsField: function (data, warn) {
- if (typeof data.keywords === "string") {
- data.keywords = data.keywords.split(/,\s+/)
- }
- }
-
-, fixVersionField: function(data) {
- if (!data.version) {
- data.version = ""
- return true
- }
- if (!semver.valid(data.version)) {
- throw new Error("invalid version: "+ data.version)
- }
- data.version = semver.clean(data.version)
- return true
- }
-
-, fixPeople: function(data) {
- modifyPeople(data, unParsePerson)
- modifyPeople(data, parsePerson)
- }
-
-, fixNameField: function(data) {
- if (!data.name) {
- data.name = ""
- return true
- }
- if (typeof data.name !== "string") {
- throw new Error("name field must be a string.")
- }
- data.name = data.name.trim()
- ensureValidName(data.name)
- }
-
-
-, fixDescriptionField: function (data) {
- if (data.description && typeof data.description !== 'string') {
- this.warn("'description' field should be a string")
- delete data.description
- }
- if (data.readme && !data.description)
- data.description = extractDescription(data.readme)
- }
-
-, fixReadmeField: function (data) {
- if (!data.readme) data.readme = "ERROR: No README data found!"
- }
-
-, fixBugsField: function(data) {
- if (!data.bugs && data.repository && data.repository.url) {
- var gh = parseGitHubURL(data.repository.url)
- if(gh) {
- if(gh.match(/^https:\/\/github.com\//))
- data.bugs = {url: gh + "/issues"}
- else // gist url
- data.bugs = {url: gh}
- }
- }
- else if(data.bugs) {
- var emailRe = /^.+@.*\..+$/
- if(typeof data.bugs == "string") {
- if(emailRe.test(data.bugs))
- data.bugs = {email:data.bugs}
- else if(url.parse(data.bugs).protocol)
- data.bugs = {url: data.bugs}
- else
- this.warn("Bug string field must be url, email, or {email,url}")
- }
- else {
- var oldBugs = data.bugs
- data.bugs = {}
- if(oldBugs.url) {
- if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol)
- data.bugs.url = oldBugs.url
- else
- this.warn("bugs.url field must be a string url. Deleted.")
- }
- if(oldBugs.email) {
- if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email))
- data.bugs.email = oldBugs.email
- else
- this.warn("bugs.email field must be a string email. Deleted.")
- }
- }
- if(!data.bugs.email && !data.bugs.url) {
- delete data.bugs
- this.warn("Normalized value of bugs field is an empty object. Deleted.")
- }
- }
- }
-
-, fixHomepageField: function(data) {
- if(!data.homepage) return true;
- if(typeof data.homepage !== "string") {
- this.warn("homepage field must be a string url. Deleted.")
- return delete data.homepage
- }
- if(!url.parse(data.homepage).protocol) {
- this.warn("homepage field must start with a protocol.")
- data.homepage = "http://" + data.homepage
- }
- }
-}
-
-function ensureValidName (name) {
- if (name.charAt(0) === "." ||
- name.match(/[\/@\s\+%:]/) ||
- name !== encodeURIComponent(name) ||
- name.toLowerCase() === "node_modules" ||
- name.toLowerCase() === "favicon.ico") {
- throw new Error("Invalid name: " + JSON.stringify(name))
- }
-}
-
-function modifyPeople (data, fn) {
- if (data.author) data.author = fn(data.author)
- ;["maintainers", "contributors"].forEach(function (set) {
- if (!Array.isArray(data[set])) return;
- data[set] = data[set].map(fn)
- })
- return data
-}
-
-function unParsePerson (person) {
- if (typeof person === "string") return person
- var name = person.name || ""
- var u = person.url || person.web
- var url = u ? (" ("+u+")") : ""
- var e = person.email || person.mail
- var email = e ? (" <"+e+">") : ""
- return name+email+url
-}
-
-function parsePerson (person) {
- if (typeof person !== "string") return person
- var name = person.match(/^([^\(<]+)/)
- var url = person.match(/\(([^\)]+)\)/)
- var email = person.match(/<([^>]+)>/)
- var obj = {}
- if (name && name[0].trim()) obj.name = name[0].trim()
- if (email) obj.email = email[1];
- if (url) obj.url = url[1];
- return obj
-}
-
-function addOptionalDepsToDeps (data, warn) {
- var o = data.optionalDependencies
- if (!o) return;
- var d = data.dependencies || {}
- Object.keys(o).forEach(function (k) {
- d[k] = o[k]
- })
- data.dependencies = d
-}
-
-function depObjectify (deps) {
- if (!deps) return {}
- if (typeof deps === "string") {
- deps = deps.trim().split(/[\n\r\s\t ,]+/)
- }
- if (!Array.isArray(deps)) return deps
- var o = {}
- deps.filter(function (d) {
- return typeof d === "string"
- }).forEach(function(d) {
- d = d.trim().split(/(:?[@\s><=])/)
- var dn = d.shift()
- var dv = d.join("")
- dv = dv.trim()
- dv = dv.replace(/^@/, "")
- o[dn] = dv
- })
- return o
-}
-
-function objectifyDeps (data, warn) {
- depTypes.forEach(function (type) {
- if (!data[type]) return;
- data[type] = depObjectify(data[type])
- })
-}
+++ /dev/null
-// a warning for deprecated or likely-incorrect fields
-
-module.exports = isValid
-
-var typos = require("./typos")
-
-function isValid (data, warnFunc) {
- var hasWarned = false
- function warn(msg) {
- hasWarned = true
- if(warnFunc) warnFunc(msg)
- }
- if (data.modules) warn("'modules' is deprecated")
- Object.keys(typos.topLevel).forEach(function (d) {
- if (data.hasOwnProperty(d)) {
- warn(makeTypoWarning(d, typos.topLevel[d]))
- }
- })
- checkBugsField(data.bugs, warn)
- checkScriptsField(data.scripts, warn)
- if (!data.repository) warn("No repository field.")
- if (!data.readme) warn("No readme data.")
- if (data.description && typeof data.description !== 'string') {
- warn("'description' field should be a string")
- }
- if (data[data.bundledDependencies] &&
- !Array.isArray(data.bundleDependencies)) {
- warn("bundleDependencies must be an array")
- }
- return !hasWarned
-}
-
-function checkBugsField (bugs, warn) {
- if (!bugs || typeof bugs !== "object") return
- Object.keys(bugs).forEach(function (k) {
- if (typos.bugs[k]) {
- bugs[typos.bugs[k]] = bugs[k]
- delete bugs[k]
- }
- })
-}
-
-function checkScriptsField (scripts, warn) {
- if (!scripts || typeof scripts !== "object") return
- Object.keys(scripts).forEach(function (k) {
- if (typos.script[k]) {
- warn(makeTypoWarning(k, typos.script[k], "scripts"))
- }
- })
-}
-
-function makeTypoWarning (providedName, probableName, field) {
- if (field) {
- providedName = field + "['" + providedName + "']"
- probableName = field + "['" + probableName + "']"
- }
- return providedName + " should probably be " + probableName + "."
-}
+++ /dev/null
-module.exports = normalize
-
-var isValid = require("./is_valid")
-var fixer = require("./fixer")
-
-var fieldsToFix = ['name','version','description','repository'
- ,'files','bin','man','bugs','keywords','readme','homepage']
-var otherThingsToFix = ['dependencies','people']
-
-var thingsToFix = fieldsToFix.map(function(fieldName) {
- return ucFirst(fieldName) + "Field"
-})
-// two ways to do this in CoffeeScript on only one line, sub-70 chars:
-// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field"
-// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix)
-thingsToFix = thingsToFix.concat(otherThingsToFix)
-
-function normalize (data, warn) {
- if(!warn) warn = function(msg) { /* noop */ }
- isValid(data, warn) // don't care if it's valid, we'll make it valid
- if (data.scripts &&
- data.scripts.install === "node-gyp rebuild" &&
- !data.scripts.preinstall) {
- data.gypfile = true
- }
- fixer.warn = warn
- thingsToFix.forEach(function(thingName) {
- fixer["fix" + ucFirst(thingName)](data)
- })
- data._id = data.name + "@" + data.version
- if (data.modules) delete data.modules // modules field is deprecated
-}
-
-function ucFirst (string) {
- return string.charAt(0).toUpperCase() + string.slice(1);
-}
+++ /dev/null
-{
- "topLevel": {
- "dependancies": "dependencies"
- ,"dependecies": "dependencies"
- ,"depdenencies": "dependencies"
- ,"devEependencies": "devDependencies"
- ,"depends": "dependencies"
- ,"dev-dependencies": "devDependencies"
- ,"devDependences": "devDependencies"
- ,"devDepenencies": "devDependencies"
- ,"devdependencies": "devDependencies"
- ,"repostitory": "repository"
- ,"prefereGlobal": "preferGlobal"
- ,"hompage": "homepage"
- ,"hampage": "homepage"
- ,"autohr": "author"
- ,"autor": "author"
- ,"contributers": "contributors"
- ,"publicationConfig": "publishConfig"
- },
- "bugs": { "web": "url", "name": "url" },
- "script": { "server": "start", "tests": "test" }
-}
\ No newline at end of file
+++ /dev/null
-node_modules
+++ /dev/null
-
-1.1.1 / 2013-04-23
-==================
-
- * package.json: Move test stuff to devDeps
-
-1.1.0 / 2013-04-19
-==================
-
- * Add support for gist urls
+++ /dev/null
-
-test:
- @./node_modules/.bin/mocha test.js --reporter spec --require should
-
-.PHONY: test
+++ /dev/null
-
-# github-url-from-git
-
-```js
-describe('parse(url)', function(){
- it('should support git://*', function(){
- var url = 'git://github.com/jamesor/mongoose-versioner';
- parse(url).should.equal('https://github.com/jamesor/mongoose-versioner');
- })
-
- it('should support git://*.git', function(){
- var url = 'git://github.com/treygriffith/cellar.git';
- parse(url).should.equal('https://github.com/treygriffith/cellar');
- })
-
- it('should support https://*', function(){
- var url = 'https://github.com/Empeeric/i18n-node';
- parse(url).should.equal('https://github.com/Empeeric/i18n-node');
- })
-
- it('should support https://*.git', function(){
- var url = 'https://jpillora@github.com/banchee/tranquil.git';
- parse(url).should.equal('https://github.com/banchee/tranquil');
- })
-
- it('should return undefined on failure', function(){
- var url = 'git://github.com/justgord/.git';
- assert(null == parse(url));
- })
-
- it('should parse git@gist urls', function() {
- var url = 'git@gist.github.com:3135914.git';
- parse(url).should.equal('https://gist.github.com/3135914')
- })
-
- it('should parse https://gist urls', function() {
- var url = 'https://gist.github.com/3135914.git';
- parse(url).should.equal('https://gist.github.com/3135914')
- })
-})
-```
+++ /dev/null
-var re = /^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/
-
-module.exports = function(url){
- try {
- var m = re.exec(url.replace(/\.git$/, ''));
- var host = m[1];
- var path = m[2];
- return 'https://' + host + '/' + path;
- } catch (err) {
- // ignore
- }
-};
+++ /dev/null
-{
- "name": "github-url-from-git",
- "version": "1.1.1",
- "description": "Parse a github git url and return the github repo url",
- "main": "index.js",
- "scripts": {
- "test": "mocha test.js --reporter spec --require should"
- },
- "repository": "",
- "keywords": [
- "github",
- "git",
- "url",
- "parser"
- ],
- "author": "",
- "license": "MIT",
- "devDependencies": {
- "better-assert": "~1.0.0",
- "mocha": "~1.9.0",
- "should": "~1.2.2"
- },
- "readme": "\n# github-url-from-git\n\n```js\ndescribe('parse(url)', function(){\n it('should support git://*', function(){\n var url = 'git://github.com/jamesor/mongoose-versioner';\n parse(url).should.equal('https://github.com/jamesor/mongoose-versioner');\n })\n\n it('should support git://*.git', function(){\n var url = 'git://github.com/treygriffith/cellar.git';\n parse(url).should.equal('https://github.com/treygriffith/cellar');\n })\n\n it('should support https://*', function(){\n var url = 'https://github.com/Empeeric/i18n-node';\n parse(url).should.equal('https://github.com/Empeeric/i18n-node');\n })\n\n it('should support https://*.git', function(){\n var url = 'https://jpillora@github.com/banchee/tranquil.git';\n parse(url).should.equal('https://github.com/banchee/tranquil');\n })\n\n it('should return undefined on failure', function(){\n var url = 'git://github.com/justgord/.git';\n assert(null == parse(url));\n })\n\n it('should parse git@gist urls', function() {\n var url = 'git@gist.github.com:3135914.git';\n parse(url).should.equal('https://gist.github.com/3135914')\n })\n\n it('should parse https://gist urls', function() {\n var url = 'https://gist.github.com/3135914.git';\n parse(url).should.equal('https://gist.github.com/3135914')\n })\n})\n```\n",
- "readmeFilename": "Readme.md",
- "_id": "github-url-from-git@1.1.1",
- "_from": "github-url-from-git@~1.1.1"
-}
+++ /dev/null
-
-var parse = require('./');
-var assert = require('better-assert');
-
-describe('parse(url)', function(){
- it('should support git://*', function(){
- var url = 'git://github.com/jamesor/mongoose-versioner';
- parse(url).should.equal('https://github.com/jamesor/mongoose-versioner');
- })
-
- it('should support git://*.git', function(){
- var url = 'git://github.com/treygriffith/cellar.git';
- parse(url).should.equal('https://github.com/treygriffith/cellar');
- })
-
- it('should support https://*', function(){
- var url = 'https://github.com/Empeeric/i18n-node';
- parse(url).should.equal('https://github.com/Empeeric/i18n-node');
- })
-
- it('should support https://*.git', function(){
- var url = 'https://jpillora@github.com/banchee/tranquil.git';
- parse(url).should.equal('https://github.com/banchee/tranquil');
- })
-
- it('should return undefined on failure', function(){
- var url = 'git://github.com/justgord/.git';
- assert(null == parse(url));
- })
-
- it('should parse git@gist urls', function() {
- var url = 'git@gist.github.com:3135914.git';
- parse(url).should.equal('https://gist.github.com/3135914')
- })
-
- it('should parse https://gist urls', function() {
- var url = 'https://gist.github.com/3135914.git';
- parse(url).should.equal('https://gist.github.com/3135914')
- })
-})
+++ /dev/null
-{
- "name": "normalize-package-data",
- "version": "0.1.7",
- "author": {
- "name": "Meryn Stol",
- "email": "merynstol@gmail.com"
- },
- "description": "Normalizes data that can be found in package.json files.",
- "repository": {
- "type": "git",
- "url": "git://github.com/meryn/normalize-package-data.git"
- },
- "main": "lib/normalize.js",
- "scripts": {
- "test": "tap test/*.js"
- },
- "dependencies": {
- "semver": "1.x",
- "github-url-from-git": "~1.1.1"
- },
- "devDependencies": {
- "tap": "~0.2.5",
- "underscore": "~1.4.4",
- "async": "~0.2.7"
- },
- "contributors": [
- {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me"
- },
- {
- "name": "Meryn Stol",
- "email": "merynstol@gmail.com"
- }
- ],
- "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the normalizeData function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nIf you don't provide a warning function, `normalizeData` functions silently.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed.\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/meryn/normalize-package-data/issues"
- },
- "_id": "normalize-package-data@0.1.7",
- "dist": {
- "shasum": "8d3240084501de180f3cef9ea7708f9279d87445"
- },
- "_from": "normalize-package-data@0.1.7",
- "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.1.7.tgz"
-}
+++ /dev/null
-var tap = require("tap")
-var normalize = require("../lib/normalize")
-var path = require("path")
-var fs = require("fs")
-
-tap.test("basic test", function (t) {
- var p = path.resolve(__dirname, "./fixtures/read-package-json.json")
- fs.readFile (p, function (err, contents) {
- if (err) throw err;
- var originalData = JSON.parse(contents.toString())
- var data = JSON.parse(contents.toString())
- normalize(data)
- t.ok(data)
- verifyFields(t, data, originalData)
- t.end()
- })
-})
-
-function verifyFields (t, normalized, original) {
- t.equal(normalized.version, original.version, "Version field stays same")
- t.equal(normalized._id, normalized.name + "@" + normalized.version, "It gets good id.")
- t.equal(normalized.name, original.name, "Name stays the same.")
- t.type(normalized.author, "object", "author field becomes object")
- t.deepEqual(normalized.scripts, original.scripts, "scripts field (object) stays same")
- t.equal(normalized.main, original.main)
- // optional deps are folded in.
- t.deepEqual(normalized.optionalDependencies,
- original.optionalDependencies)
- t.has(normalized.dependencies, original.optionalDependencies, "opt depedencies are copied into dependencies")
- t.has(normalized.dependencies, original.dependencies, "regular depedencies stay in place")
- t.deepEqual(normalized.devDependencies, original.devDependencies)
- t.type(normalized.bugs, "object", "bugs should become object")
- t.equal(normalized.bugs.url, "https://github.com/isaacs/read-package-json/issues")
-}
+++ /dev/null
-var tap = require("tap")
-var normalize = require("../lib/normalize")
-var path = require("path")
-var fs = require("fs")
-var _ = require("underscore")
-var async = require("async")
-
-var data, clonedData
-var warn
-
-tap.test("consistent normalization", function(t) {
- path.resolve(__dirname, "./fixtures/read-package-json.json")
- fs.readdir (__dirname + "/fixtures", function (err, entries) {
- // entries = ['coffee-script.json'] // uncomment to limit to a specific file
- verifyConsistency = function(entryName, next) {
- warn = function(msg) {
- // t.equal("",msg) // uncomment to have some kind of logging of warnings
- }
- filename = __dirname + "/fixtures/" + entryName
- fs.readFile(filename, function(err, contents) {
- if (err) return next(err)
- data = JSON.parse(contents.toString())
- normalize(data, warn)
- clonedData = _.clone(data)
- normalize(data, warn)
- t.deepEqual(clonedData, data,
- "Normalization of " + entryName + "is consistent.")
- next(null)
- }) // fs.readFile
- } // verifyConsistency
- async.forEach(entries, verifyConsistency, function(err) {
- if (err) throw err
- t.end()
- })
- }) // fs.readdir
-}) // tap.test
\ No newline at end of file
+++ /dev/null
-{
- "name": "async",
- "description": "Higher-order functions and common patterns for asynchronous code",
- "main": "./lib/async",
- "author": "Caolan McMahon",
- "version": "0.2.6",
- "repository" : {
- "type" : "git",
- "url" : "http://github.com/caolan/async.git"
- },
- "bugs" : {
- "url" : "http://github.com/caolan/async/issues"
- },
- "licenses" : [
- {
- "type" : "MIT",
- "url" : "http://github.com/caolan/async/raw/master/LICENSE"
- }
- ],
- "devDependencies": {
- "nodeunit": ">0.0.0",
- "uglify-js": "1.2.x",
- "nodelint": ">0.0.0"
- },
- "jam": {
- "main": "lib/async.js",
- "include": [
- "lib/async.js",
- "README.md",
- "LICENSE"
- ]
- },
- "scripts": {
- "test": "nodeunit test/test-async.js"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "bcrypt",
- "description": "A bcrypt library for NodeJS.",
- "keywords": [
- "bcrypt",
- "password",
- "auth",
- "authentication",
- "encryption",
- "crypt",
- "crypto"
- ],
- "main": "./bcrypt",
- "version": "0.7.5",
- "author": "Nick Campbell (http://github.com/ncb000gt)",
- "engines": {
- "node": ">= 0.6.0"
- },
- "repository": {
- "type": "git",
- "url": "http://github.com/ncb000gt/node.bcrypt.js.git"
- },
- "licenses": [
- {
- "type": "MIT"
- }
- ],
- "bugs": {
- "url": "http://github.com/ncb000gt/node.bcrypt.js/issues"
- },
- "scripts": {
- "test": "node-gyp configure build && nodeunit test"
- },
- "dependencies": {
- "bindings": "1.0.0"
- },
- "devDependencies": {
- "nodeunit": ">=0.6.4"
- },
- "contributors": [
- "Antonio Salazar Cardozo <savedfastcool@gmail.com> (https://github.com/Shadowfiend)",
- "Van Nguyen <the.gol.effect@gmail.com> (https://github.com/thegoleffect)",
- "David Trejo <david@dtrejo.com> (https://github.com/dtrejo)",
- "Ben Glow <glen.low@pixelglow.com> (https://github.com/pixelglow)",
- "NewITFarmer.com <> (https://github.com/newitfarmer)",
- "Alfred Westerveld <alfredwesterveld@gmail.com> (https://github.com/alfredwesterveld)",
- "Vincent Côté-Roy <vincentcr@gmail.com> (https://github.com/vincentcr)",
- "Lloyd Hilaiel <lloyd@hilaiel.com> (https://github.com/lloyd)",
- "Roman Shtylman <shtylman@gmail.com> (https://github.com/shtylman)",
- "Vadim Graboys <dimva13@gmail.com> (https://github.com/vadimg)",
- "Ben Noorduis <> (https://github.com/bnoordhuis)",
- "Nate Rajlich <nathan@tootallnate.net> (https://github.com/tootallnate)",
- "Sean McArthur <sean.monstar@gmail.com> (https://github.com/seanmonstar)",
- "Fanie Oosthuysen <fanie.oosthuysen@gmail.com> (https://github.com/weareu)"
- ]
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "coffee-script",
- "description": "Unfancy JavaScript",
- "keywords": ["javascript", "language", "coffeescript", "compiler"],
- "author": "Jeremy Ashkenas",
- "version": "1.6.2",
- "licenses": [{
- "type": "MIT",
- "url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE"
- }],
- "engines": {
- "node": ">=0.8.0"
- },
- "directories" : {
- "lib" : "./lib/coffee-script"
- },
- "main" : "./lib/coffee-script/coffee-script",
- "bin": {
- "coffee": "./bin/coffee",
- "cake": "./bin/cake"
- },
- "scripts": {
- "test": "node ./bin/cake test"
- },
- "homepage": "http://coffeescript.org",
- "bugs": "https://github.com/jashkenas/coffee-script/issues",
- "repository": {
- "type": "git",
- "url": "git://github.com/jashkenas/coffee-script.git"
- },
- "devDependencies": {
- "uglify-js": "~2.2",
- "jison": ">=0.2.0"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "http-server",
- "preferGlobal": true,
- "version": "0.3.0",
- "author": "Nodejitsu <support@nodejitsu.com>",
- "description": "a simple zero-configuration command-line http server",
- "contributors": [
- {
- "name": "Marak Squires",
- "email": "marak@nodejitsu.com"
- }
- ],
- "bin": {
- "http-server": "./bin/http-server"
- },
- "scripts": {
- "start": "node ./bin/http-server",
- "test": "vows --spec --isolate",
- "predeploy": "echo This will be run before deploying the app",
- "postdeploy": "echo This will be run after deploying the app"
- },
- "main": "./lib/http-server",
- "repository": {
- "type": "git",
- "url": "https://github.com/nodejitsu/http-server.git"
- },
- "keywords": [
- "cli",
- "http",
- "server"
- ],
- "dependencies" : {
- "colors" : "*",
- "flatiron" : "0.1.x",
- "optimist" : "0.2.x",
- "union" : "0.1.x",
- "ecstatic" : "0.1.x",
- "plates" : "https://github.com/flatiron/plates/tarball/master"
- },
- "analyze": false,
- "devDependencies": {
- "vows" : "0.5.x",
- "request" : "2.1.x"
- },
- "bundledDependencies": [
- "union",
- "ecstatic"
- ],
- "license": "MIT",
- "engines": {
- "node": ">=0.6"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "movefile",
- "description": "rename implementation working over devices",
- "version": "0.2.0",
- "author": "yazgazan <yazgazan@gmail.com>",
- "main": "./build/Release/movefile",
- "keywords": ["move", "file", "rename"],
- "repository": "git://github.com/yazgazan/movefile.git",
- "directories": {
- "lib": "./build/Release/"
- },
- "scripts": {
- "install": "./node_modules/node-gyp/bin/node-gyp.js configure && ./node_modules/node-gyp/bin/node-gyp.js build"
- },
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "node-gyp": "~0.9.1"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "node-module_exist",
- "description": "Find if a NodeJS module is available to require or not",
- "version": "0.0.1",
- "main": "module_exist.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "repository": {
- "type": "git",
- "url": "git@gist.github.com:3135914.git"
- },
- "homepage": "https://github.com/FGRibreau",
- "author": {
- "name": "Francois-Guillaume Ribreau",
- "url": "http://fgribreau.com.com/"
- },
- "devDependencies": {
- "nodeunit": "~0.7.4"
- },
- "keywords": [
- "core",
- "modules"
- ],
- "license": "MIT"
-}
\ No newline at end of file
+++ /dev/null
-{
- "version": "1.2.17",
- "name": "npm",
- "publishConfig": {
- "proprietary-attribs": false
- },
- "description": "A package manager for node",
- "keywords": [
- "package manager",
- "modules",
- "install",
- "package.json"
- ],
- "preferGlobal": true,
- "config": {
- "publishtest": false
- },
- "homepage": "https://npmjs.org/doc/",
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
- "repository": {
- "type": "git",
- "url": "https://github.com/isaacs/npm"
- },
- "bugs": {
- "email": "npm-@googlegroups.com",
- "url": "http://github.com/isaacs/npm/issues"
- },
- "directories": {
- "doc": "./doc",
- "man": "./man",
- "lib": "./lib",
- "bin": "./bin"
- },
- "main": "./lib/npm.js",
- "bin": "./bin/npm-cli.js",
- "dependencies": {
- "semver": "~1.1.2",
- "ini": "~1.1.0",
- "slide": "1",
- "abbrev": "~1.0.4",
- "graceful-fs": "~1.2.0",
- "minimatch": "~0.2.11",
- "nopt": "~2.1.1",
- "rimraf": "2",
- "request": "~2.9",
- "which": "1",
- "tar": "~0.1.17",
- "fstream": "~0.1.22",
- "block-stream": "*",
- "inherits": "1",
- "mkdirp": "~0.3.3",
- "read": "~1.0.4",
- "lru-cache": "~2.3.0",
- "node-gyp": "~0.9.3",
- "fstream-npm": "~0.1.3",
- "uid-number": "0",
- "archy": "0",
- "chownr": "0",
- "npmlog": "0",
- "ansi": "~0.1.2",
- "npm-registry-client": "~0.2.18",
- "read-package-json": "~0.3.0",
- "read-installed": "0",
- "glob": "~3.1.21",
- "init-package-json": "0.0.6",
- "osenv": "0",
- "lockfile": "~0.3.0",
- "retry": "~0.6.0",
- "once": "~1.1.1",
- "npmconf": "0",
- "opener": "~1.3.0",
- "chmodr": "~0.1.0",
- "cmd-shim": "~1.1.0"
- },
- "bundleDependencies": [
- "semver",
- "ini",
- "slide",
- "abbrev",
- "graceful-fs",
- "minimatch",
- "nopt",
- "rimraf",
- "request",
- "which",
- "tar",
- "fstream",
- "block-stream",
- "inherits",
- "mkdirp",
- "read",
- "lru-cache",
- "node-gyp",
- "fstream-npm",
- "uid-number",
- "archy",
- "chownr",
- "npmlog",
- "ansi",
- "npm-registry-client",
- "read-package-json",
- "read-installed",
- "glob",
- "init-package-json",
- "osenv",
- "lockfile",
- "retry",
- "once",
- "npmconf",
- "opener",
- "chmodr",
- "cmd-shim"
- ],
- "devDependencies": {
- "ronn": "~0.3.6",
- "tap": "~0.4.0"
- },
- "engines": {
- "node": ">=0.6",
- "npm": "1"
- },
- "scripts": {
- "test": "node ./test/run.js && tap test/tap/*.js",
- "tap": "tap test/tap/*.js",
- "prepublish": "node bin/npm-cli.js prune ; rm -rf test/*/*/node_modules ; make -j4 doc",
- "dumpconf": "env | grep npm | sort | uniq",
- "echo": "node bin/npm-cli.js"
- },
- "licenses": [
- {
- "type": "MIT +no-false-attribs",
- "url": "https://github.com/isaacs/npm/raw/master/LICENSE"
- }
- ]
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "read-package-json",
- "version": "0.1.1",
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
- "description": "The thing npm uses to read package.json files with semantics and defaults and validation",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/read-package-json.git"
- },
- "main": "read-json.js",
- "scripts": {
- "test": "tap test/*.js"
- },
- "dependencies": {
- "glob": "~3.1.9",
- "lru-cache": "~1.1.0",
- "semver": "~1.0.14",
- "slide": "~1.1.3"
- },
- "devDependencies": {
- "tap": "~0.2.5"
- },
- "optionalDependencies": {
- "npmlog": "0",
- "graceful-fs": "~1.1.8"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "request",
- "description": "Simplified HTTP request client.",
- "tags": [
- "http",
- "simple",
- "util",
- "utility"
- ],
- "version": "2.16.7",
- "author": "Mikeal Rogers <mikeal.rogers@gmail.com>",
- "repository": {
- "type": "git",
- "url": "http://github.com/mikeal/request.git"
- },
- "bugs": {
- "url": "http://github.com/mikeal/request/issues"
- },
- "engines": [
- "node >= 0.8.0"
- ],
- "main": "index.js",
- "dependencies": {
- "form-data": "~0.0.3",
- "mime": "~1.2.7",
- "hawk": "~0.10.2",
- "node-uuid": "~1.4.0",
- "cookie-jar": "~0.2.0",
- "aws-sign": "~0.2.0",
- "oauth-sign": "~0.2.0",
- "forever-agent": "~0.2.0",
- "tunnel-agent": "~0.2.0",
- "json-stringify-safe": "~3.0.0",
- "qs": "~0.5.4"
- },
- "scripts": {
- "test": "node tests/run.js"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "name" : "underscore",
- "description" : "JavaScript's functional programming helper library.",
- "homepage" : "http://underscorejs.org",
- "keywords" : ["util", "functional", "server", "client", "browser"],
- "author" : "Jeremy Ashkenas <jeremy@documentcloud.org>",
- "repository" : {"type": "git", "url": "git://github.com/documentcloud/underscore.git"},
- "main" : "underscore.js",
- "version" : "1.4.4",
- "devDependencies": {
- "phantomjs": "1.9.0-1"
- },
- "scripts": {
- "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true"
- },
- "license" : "MIT"
-}
\ No newline at end of file
+++ /dev/null
-var tap = require("tap")
-var normalize = require("../lib/normalize")
-var path = require("path")
-var fs = require("fs")
-var _ = require("underscore")
-var async = require("async")
-
-var data, clonedData
-var warn
-
-tap.test("consistent normalization", function(t) {
- entries = [
- 'read-package-json.json',
- 'http-server.json',
- "movefile.json",
- "node-module_exist.json"
- ]
- verifyConsistency = function(entryName, next) {
- warn = function(msg) {
- // t.equal("",msg) // uncomment to have some kind of logging of warnings
- }
- filename = __dirname + "/fixtures/" + entryName
- fs.readFile(filename, function(err, contents) {
- if (err) return next(err)
- data = JSON.parse(contents.toString())
- normalize(data, warn)
- if(data.name == "node-module_exist") {
- t.same(data.bugs.url, "https://gist.github.com/3135914")
- }
- if(data.name == "read-package-json") {
- t.same(data.bugs.url, "https://github.com/isaacs/read-package-json/issues")
- }
- if(data.name == "http-server") {
- t.same(data.bugs.url, "https://github.com/nodejitsu/http-server/issues")
- }
- if(data.name == "movefile") {
- t.same(data.bugs.url, "https://github.com/yazgazan/movefile/issues")
- }
- next(null)
- }) // fs.readFile
- } // verifyConsistency
- async.forEach(entries, verifyConsistency, function(err) {
- if (err) throw err
- t.end()
- })
-}) // tap.test
\ No newline at end of file
+++ /dev/null
-var tap = require("tap")
-var fs = require("fs")
-var path = require("path")
-
-var globals = Object.keys(global)
-
-var normalize = require("../lib/normalize")
-
-var rpjPath = path.resolve(__dirname,"./fixtures/read-package-json.json")
-tap.test("normalize some package data", function(t) {
- var packageData = require(rpjPath)
- var warnings = []
- normalize(packageData, function(warning) {
- warnings.push(warning)
- })
- // there's no readme data in this particular object
- t.equal( warnings.length, 1, "There's exactly one warning.")
- fs.readFile(rpjPath, function(err, data) {
- if(err) throw err
- // Various changes have been made
- t.notEqual(packageData, JSON.parse(data), "Output is different from input.")
- t.end()
- })
-})
-
-tap.test("runs without passing warning function", function(t) {
- var packageData = require(rpjPath)
- fs.readFile(rpjPath, function(err, data) {
- if(err) throw err
- normalize(JSON.parse(data))
- t.ok(true, "If you read this, this means I'm still alive.")
- t.end()
- })
-})
-
-tap.test("empty object", function(t) {
- var packageData = {}
- var expect =
- { name: '',
- version: '',
- readme: 'ERROR: No README data found!',
- _id: '@' }
-
- var warnings = []
- function warn(m) {
- warnings.push(m)
- }
- normalize(packageData, warn)
- t.same(packageData, expect)
- t.same(warnings, ["No repository field.","No readme data."])
- t.end()
-})
-
-tap.test("urls required", function(t) {
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- normalize({
- bugs: {
- url: "/1",
- email: "not an email address"
- }
- }, warn)
- var a
- normalize(a={
- readme: "read yourself how about",
- homepage: 123,
- bugs: "what is this i don't even",
- repository: "Hello."
- }, warn)
-
- console.error(a)
-
- var expect =
- [ 'No repository field.',
- 'No readme data.',
- 'bugs.url field must be a string url. Deleted.',
- 'bugs.email field must be a string email. Deleted.',
- 'Normalized value of bugs field is an empty object. Deleted.',
- 'Bug string field must be url, email, or {email,url}',
- 'Normalized value of bugs field is an empty object. Deleted.',
- 'homepage field must be a string url. Deleted.' ]
- t.same(warnings, expect)
- t.end()
-})
-
-tap.test("homepage field must start with a protocol.", function(t) {
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- var a
- normalize(a={
- homepage: 'example.org'
- }, warn)
-
- console.error(a)
-
- var expect =
- [ 'No repository field.',
- 'No readme data.',
- 'homepage field must start with a protocol.' ]
- t.same(warnings, expect)
- t.same(a.homepage, 'http://example.org')
- t.end()
-})
-
-tap.test("gist bugs url", function(t) {
- var d = {
- repository: "git@gist.github.com:123456.git"
- }
- normalize(d)
- t.same(d.repository, { type: 'git', url: 'git@gist.github.com:123456.git' })
- t.same(d.bugs, { url: 'https://gist.github.com/123456' })
- t.end();
-});
-
-tap.test('no new globals', function(t) {
- t.same(Object.keys(global), globals)
- t.end()
-})
-
-tap.test("singularize repositories", function(t) {
- d = {repositories:["git@gist.github.com:123456.git"]}
- normalize(d)
- t.same(d.repository, { type: 'git', url: 'git@gist.github.com:123456.git' })
- t.end()
-});
\ No newline at end of file
+++ /dev/null
-var test = require('tap').test
-var normalize = require('../')
-var typos = require('../lib/typos.json')
-
-test('typos', function(t) {
- var warnings = []
- function warn(m) {
- warnings.push(m)
- }
-
- var expect =
- [ 'dependancies should probably be dependencies.',
- 'dependecies should probably be dependencies.',
- 'depdenencies should probably be dependencies.',
- 'devEependencies should probably be devDependencies.',
- 'depends should probably be dependencies.',
- 'dev-dependencies should probably be devDependencies.',
- 'devDependences should probably be devDependencies.',
- 'devDepenencies should probably be devDependencies.',
- 'devdependencies should probably be devDependencies.',
- 'repostitory should probably be repository.',
- 'prefereGlobal should probably be preferGlobal.',
- 'hompage should probably be homepage.',
- 'hampage should probably be homepage.',
- 'autohr should probably be author.',
- 'autor should probably be author.',
- 'contributers should probably be contributors.',
- 'publicationConfig should probably be publishConfig.',
- 'No repository field.',
- 'No repository field.',
- 'No readme data.',
- 'bugs.url field must be a string url. Deleted.',
- 'Normalized value of bugs field is an empty object. Deleted.',
- 'No repository field.',
- 'No readme data.' ]
-
- normalize({"dependancies": "dependencies"
- ,"dependecies": "dependencies"
- ,"depdenencies": "dependencies"
- ,"devEependencies": "devDependencies"
- ,"depends": "dependencies"
- ,"dev-dependencies": "devDependencies"
- ,"devDependences": "devDependencies"
- ,"devDepenencies": "devDependencies"
- ,"devdependencies": "devDependencies"
- ,"repostitory": "repository"
- ,"prefereGlobal": "preferGlobal"
- ,"hompage": "homepage"
- ,"hampage": "homepage"
- ,"autohr": "author"
- ,"autor": "author"
- ,"contributers": "contributors"
- ,"publicationConfig": "publishConfig"
- ,readme:"asdf"
- ,name:"name"
- ,version:"1.2.5"}, warn)
-
- normalize({name:"name"
- ,version:"1.2.5"
- ,bugs:{web:"url",name:"url"}}, warn)
-
- normalize({name:"name"
- ,version:"1.2.5"
- ,script:{server:"start",tests:"test"}}, warn)
- t.same(warnings, expect)
- t.end();
-})
return requestAll.call(this, cb)
}
- var cache = path.join(this.conf.get('cache'), uri, ".cache.json")
+ var cacheUri = uri
+ // on windows ":" is not an allowed character in a foldername
+ cacheUri = cacheUri.replace(/:/g, '_')
+ var cache = path.join(this.conf.get('cache'), cacheUri, ".cache.json")
+
fs.stat(cache, function (er, stat) {
if (!er) fs.readFile(cache, function (er, data) {
try { data = JSON.parse(data) }
, p = url.parse(where).pathname.split("/")
, _ = "/"
, caches = p.map(function (part) {
+ part = part.replace(/:/g, "_")
return _ = path.join(_, part)
}).map(function (cache) {
return path.join(this.conf.get('cache'), cache, ".cache.json")
// That's what you get for deleting stuff. Don't do that.
if (method === "DELETE") {
p = p.slice(0, p.indexOf("-rev"))
- caches.push(path.join(this.conf.get('cache'), p.join("/")))
+ p = p.join("/").replace(/:/g, "_")
+ caches.push(path.join(this.conf.get('cache'), p))
}
asyncMap(caches, rm, function () {})
if (latestVer === ver) {
data["dist-tags"].latest =
- Object.getOwnPropertyNames(versions).sort(semver.compare).pop()
+ Object.getOwnPropertyNames(versions).sort(semver.compareLoose).pop()
}
var rev = data._rev
"url": "https://github.com/isaacs/couch-login/issues"
},
"_id": "couch-login@0.1.17",
- "_from": "couch-login@"
+ "dist": {
+ "shasum": "ab3ac31dd56e1061ea5f7faa838c7bda32a2b2ed"
+ },
+ "_from": "couch-login@~0.1.15",
+ "_resolved": "https://registry.npmjs.org/couch-login/-/couch-login-0.1.17.tgz"
}
},
"name": "npm-registry-client",
"description": "Client for the npm registry",
- "version": "0.2.24",
+ "version": "0.2.26",
"repository": {
"url": "git://github.com/isaacs/npm-registry-client"
},
"dependencies": {
"request": "2 >=2.20.0",
"graceful-fs": "~1.2.0",
- "semver": "~1.1.0",
+ "semver": "~2.0.5",
"slide": "~1.1.3",
"chownr": "0",
"mkdirp": "~0.3.3",
"bugs": {
"url": "https://github.com/isaacs/npm-registry-client/issues"
},
- "_id": "npm-registry-client@0.2.24",
- "_from": "npm-registry-client@~0.2.22"
+ "_id": "npm-registry-client@0.2.26",
+ "_from": "npm-registry-client@latest"
}
}
}
-if (!stableFamily || (+stableFamily[2] % 2)) stableFamily = null
-else stableFamily = stableFamily[1] + "." + stableFamily[2]
+if (!stableFamily || (+stableFamily.minor % 2)) stableFamily = null
+else stableFamily = stableFamily.major + "." + stableFamily.minor
var defaults
{
"name": "npmconf",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "The config thing npm uses",
"main": "npmconf.js",
"directories": {
"mkdirp": "~0.3.3",
"osenv": "0.0.3",
"nopt": "2",
- "semver": "~1.1.0",
+ "semver": "2",
"ini": "~1.1.0"
},
"devDependencies": {},
"bugs": {
"url": "https://github.com/isaacs/npmconf/issues"
},
- "_id": "npmconf@0.1.0",
+ "_id": "npmconf@0.1.1",
"_from": "npmconf@latest"
}
-Copyright (c) Isaac Z. Schlueter
+Copyright (c) Isaac Z. Schlueter ("Author")
All rights reserved.
The BSD License
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
+
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
+
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
this.emitLog(m)
-}
+}.bind(log)
log.emitLog = function (m) {
if (this._paused) {
a[i + 1] = arguments[i]
}
return this.log.apply(this, a)
- }
+ }.bind(this)
this.disp[lvl] = disp
}
},
"name": "npmlog",
"description": "logger for npm",
- "version": "0.0.2",
+ "version": "0.0.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/npmlog.git"
"tap": ""
},
"license": "BSD",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
+ "readme": "# npmlog\n\nThe logger util that npm uses.\n\nThis logger is very basic. It does the logging for npm. It supports\ncustom levels and colored output.\n\nBy default, logs are written to stderr. If you want to send log messages\nto outputs other than streams, then you can change the `log.stream`\nmember, or you can just listen to the events that it emits, and do\nwhatever you want with them.\n\n# Basic Usage\n\n```\nvar log = require('npmlog')\n\n// additional stuff ---------------------------+\n// message ----------+ |\n// prefix ----+ | |\n// level -+ | | |\n// v v v v\n log.info('fyi', 'I have a kitty cat: %j', myKittyCat)\n```\n\n## log.level\n\n* {String}\n\nThe level to display logs at. Any logs at or above this level will be\ndisplayed. The special level `silent` will prevent anything from being\ndisplayed ever.\n\n## log.record\n\n* {Array}\n\nAn array of all the log messages that have been entered.\n\n## log.maxRecordSize\n\n* {Number}\n\nThe maximum number of records to keep. If log.record gets bigger than\n10% over this value, then it is sliced down to 90% of this value.\n\nThe reason for the 10% window is so that it doesn't have to resize a\nlarge array on every log entry.\n\n## log.prefixStyle\n\n* {Object}\n\nA style object that specifies how prefixes are styled. (See below)\n\n## log.headingStyle\n\n* {Object}\n\nA style object that specifies how the heading is styled. (See below)\n\n## log.heading\n\n* {String} Default: \"\"\n\nIf set, a heading that is printed at the start of every line.\n\n## log.stream\n\n* {Stream} Default: `process.stderr`\n\nThe stream where output is written.\n\n## log.enableColor()\n\nForce colors to be used on all messages, regardless of the output\nstream.\n\n## log.disableColor()\n\nDisable colors on all messages.\n\n## log.pause()\n\nStop emitting messages to the stream, but do not drop them.\n\n## log.resume()\n\nEmit all buffered messages that were written while paused.\n\n## log.log(level, prefix, message, ...)\n\n* `level` {String} The level to emit the message at\n* `prefix` {String} A string prefix. Set to \"\" to skip.\n* `message...` Arguments to `util.format`\n\nEmit a log message at the specified level.\n\n## log\\[level](prefix, message, ...)\n\nFor example,\n\n* log.silly(prefix, message, ...)\n* log.verbose(prefix, message, ...)\n* log.info(prefix, message, ...)\n* log.http(prefix, message, ...)\n* log.warn(prefix, message, ...)\n* log.error(prefix, message, ...)\n\nLike `log.log(level, prefix, message, ...)`. In this way, each level is\ngiven a shorthand, so you can do `log.info(prefix, message)`.\n\n## log.addLevel(level, n, style, disp)\n\n* `level` {String} Level indicator\n* `n` {Number} The numeric level\n* `style` {Object} Object with fg, bg, inverse, etc.\n* `disp` {String} Optional replacement for `level` in the output.\n\nSets up a new level with a shorthand function and so forth.\n\nNote that if the number is `Infinity`, then setting the level to that\nwill cause all log messages to be suppressed. If the number is\n`-Infinity`, then the only way to show it is to enable all log messages.\n\n# Events\n\nEvents are all emitted with the message object.\n\n* `log` Emitted for all messages\n* `log.<level>` Emitted for all messages with the `<level>` level.\n* `<prefix>` Messages with prefixes also emit their prefix as an event.\n\n# Style Objects\n\nStyle objects can have the following fields:\n\n* `fg` {String} Color for the foreground text\n* `bg` {String} Color for the background\n* `bold`, `inverse`, `underline` {Boolean} Set the associated property\n* `bell` {Boolean} Make a noise (This is pretty annoying, probably.)\n\n# Message Objects\n\nEvery log event is emitted with a message object, and the `log.record`\nlist contains all of them that have been created. They have the\nfollowing fields:\n\n* `id` {Number}\n* `level` {String}\n* `prefix` {String}\n* `message` {String} Result of `util.format()`\n* `messageRaw` {Array} Arguments to `util.format()`\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/npmlog/issues"
},
- "_id": "npmlog@0.0.2",
- "optionalDependencies": {},
- "engines": {
- "node": "*"
- },
- "_engineSupported": true,
- "_npmVersion": "1.1.24",
- "_nodeVersion": "v0.7.10-pre",
- "_defaultsLoaded": true,
- "dist": {
- "shasum": "f0cf4b2c519950c00e91ba8e2868b62bf86254f6"
- },
- "_from": "npmlog@0"
+ "_id": "npmlog@0.0.3",
+ "_from": "npmlog@latest"
}
```javascript
var readInstalled = require("read-installed")
// depth is optional, defaults to Infinity
-readInstalled(folder, depth, function (er, data) {
+readInstalled(folder, depth, logFunction, function (er, data) {
...
})
```
{
"name": "read-installed",
"description": "Read all the installed packages in a folder, and return a tree structure with all the data.",
- "version": "0.1.1",
+ "version": "0.2.2",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/read-installed"
"test": "node test/basic.js"
},
"dependencies": {
- "semver": "1.x",
+ "semver": "2",
"slide": "~1.1.3",
- "read-package-json": "0",
- "graceful-fs": "~1.2.0",
- "npmlog": "0"
+ "read-package-json": "1",
+ "graceful-fs": "~1.2.0"
},
"optionalDependencies": {
- "graceful-fs": "~1.2.0",
- "npmlog": "0"
+ "graceful-fs": "~1.2.0"
},
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
- "readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// depth is optional, defaults to Infinity\nreadInstalled(folder, depth, function (er, data) {\n ...\n})\n```\n",
+ "readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// depth is optional, defaults to Infinity\nreadInstalled(folder, depth, logFunction, function (er, data) {\n ...\n})\n```\n",
"readmeFilename": "README.md",
- "_id": "read-installed@0.1.1",
- "_from": "read-installed@0"
+ "bugs": {
+ "url": "https://github.com/isaacs/read-installed/issues"
+ },
+ "_id": "read-installed@0.2.2",
+ "_from": "read-installed@latest"
}
var fs = require("fs")
}
-try {
- var log = require("npmlog")
-} catch (_) {
- var log = { verbose: noop, info: noop, warn: noop, error: noop }
- function noop () {}
-}
-
var path = require("path")
var asyncMap = require("slide").asyncMap
var semver = require("semver")
module.exports = readInstalled
-function readInstalled (folder, depth, cb) {
- if (typeof cb !== "function") cb = depth, depth = Infinity
+function readInstalled (folder, depth_, log_, cb_) {
+ var depth = Infinity, log = function () {}, cb
+ for (var i = 1; i < arguments.length - 1; i++) {
+ if (typeof arguments[i] === 'number')
+ depth = arguments[i]
+ else if (typeof arguments[i] === 'function')
+ log = arguments[i]
+ }
+ cb = arguments[i]
+
readInstalled_(folder, null, null, null, 0, depth, function (er, obj) {
if (er) return cb(er)
// now obj has all the installed things, where they're installed
// figure out the inheritance links, now that the object is built.
- resolveInheritance(obj)
+ resolveInheritance(obj, log)
cb(null, obj)
})
}
// "foo":"http://blah" is always presumed valid
if (reqver
- && semver.validRange(reqver)
- && !semver.satisfies(obj.version, reqver)) {
+ && semver.validRange(reqver, true)
+ && !semver.satisfies(obj.version, reqver, true)) {
obj.invalid = true
}
// starting from a root object, call findUnmet on each layer of children
var riSeen = []
-function resolveInheritance (obj) {
+function resolveInheritance (obj, log) {
if (typeof obj !== "object") return
if (riSeen.indexOf(obj) !== -1) return
riSeen.push(obj)
obj.dependencies = {}
}
Object.keys(obj.dependencies).forEach(function (dep) {
- findUnmet(obj.dependencies[dep])
+ findUnmet(obj.dependencies[dep], log)
})
Object.keys(obj.dependencies).forEach(function (dep) {
- resolveInheritance(obj.dependencies[dep])
+ resolveInheritance(obj.dependencies[dep], log)
})
- findUnmet(obj)
+ findUnmet(obj, log)
}
// find unmet deps by walking up the tree object.
// No I/O
var fuSeen = []
-function findUnmet (obj) {
+function findUnmet (obj, log) {
if (fuSeen.indexOf(obj) !== -1) return
fuSeen.push(obj)
//console.error("find unmet", obj.name, obj.parent && obj.parent.name)
if ( typeof deps[d] === "string"
// url deps presumed innocent.
&& !url.parse(deps[d]).protocol
- && !semver.satisfies(found.version, deps[d])) {
+ && !semver.satisfies(found.version, deps[d], true)) {
// the bad thing will happen
- log.warn("unmet dependency", obj.path + " requires "+d+"@'"+deps[d]
- +"' but will load\n"
- +found.path+",\nwhich is version "+found.version
- )
+ log("unmet dependency", obj.path + " requires "+d+"@'"+deps[d]
+ +"' but will load\n"
+ +found.path+",\nwhich is version "+found.version
+ )
found.invalid = true
} else {
found.extraneous = false
dependency.extraneous = false
- if (!semver.satisfies(dependency.version, peerDeps[d])) {
+ if (!semver.satisfies(dependency.version, peerDeps[d], true)) {
dependency.peerInvalid = true
}
})
- log.verbose("readInstalled", "returning", obj._id)
return obj
}
console.error("testing")
var called = 0
-readInstalled(process.cwd(), function (er, map) {
+readInstalled(process.cwd(), console.error, function (er, map) {
console.error(called ++)
if (er) return console.error(er.stack || er.message)
cleanup(map)
```javascript
var readJson = require('read-package-json')
-readJson('/path/to/package.json', function (er, data) {
+// readJson(filename, [logFunction=noop], [strict=false], cb)
+readJson('/path/to/package.json', console.error, false, function (er, data) {
if (er) {
console.error("There was an error reading the file")
return
}
```
-## readJson(file, cb)
+## readJson(file, [logFn = noop], [strict = false], cb)
* `file` {String} The path to the package.json file
-* `cb` {Function}
+* `logFn` {Function} Function to handle logging. Defaults to a noop.
+* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and
+ other strict requirements.
+* `cb` {Function} Gets called with `(er, data)`, as is The Node Way.
Reads the JSON file and does the things.
* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.
* If `homepage` field is not a string, it will be removed.
+* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.
### Rules for name field
var depTypes = ["dependencies","devDependencies","optionalDependencies"]
var extractDescription = require("./extract_description")
var url = require("url")
+var typos = require("./typos")
var fixer = module.exports = {
+ // default warning function
+ warn: function() {},
+
fixRepositoryField: function(data) {
if (data.repositories) {
this.warn("'repositories' (plural) Not supported.\n" +
"Please pick one as the 'repository' field");
data.repository = data.repositories[0]
}
- if (!data.repository) return;
+ if (!data.repository) return this.warn('No repository field.')
if (typeof data.repository === "string") {
data.repository = {
type: "git",
}
}
+, fixTypos: function(data) {
+ Object.keys(typos.topLevel).forEach(function (d) {
+ if (data.hasOwnProperty(d)) {
+ this.warn(makeTypoWarning(d, typos.topLevel[d]))
+ }
+ }, this)
+ }
+
+, fixScriptsField: function(data) {
+ if (!data.scripts) return
+ if (typeof data.scripts !== "object") {
+ this.warn("scripts must be an object")
+ delete data.scripts
+ }
+ Object.keys(data.scripts).forEach(function (k) {
+ if (typeof data.scripts[k] !== "string") {
+ this.warn("script values must be string commands")
+ delete data.scripts[k]
+ } else if (typos.script[k]) {
+ this.warn(makeTypoWarning(k, typos.script[k], "scripts"))
+ }
+ }, this)
+ }
+
, fixFilesField: function(data) {
var files = data.files
if (files && !Array.isArray(files)) {
this.warn("Invalid 'files' member")
delete data.files
+ } else if (data.files) {
+ data.files = data.files.filter(function(file) {
+ if (!file || typeof file !== "string") {
+ this.warn("Invalid filename in 'files' list: " + file)
+ return false
+ } else {
+ return true
+ }
+ }, this)
}
}
data[bd] = data[bdd]
delete data[bdd]
}
+ if (data[bd] && !Array.isArray(data[bd])) {
+ this.warn("Invalid 'bundleDependencies' list. " +
+ "Must be array of package names")
+ delete data[bd]
+ } else if (data[bd]) {
+ data[bd] = data[bd].filter(function(bd) {
+ if (!bd || typeof bd !== 'string') {
+ this.warn("Invalid bundleDependencies member: " + bd)
+ return false
+ } else {
+ return true
+ }
+ }, this)
+ }
}
-, fixDependencies: function(data) {
+, fixDependencies: function(data, strict) {
+ var loose = !strict
objectifyDeps(data, this.warn)
addOptionalDepsToDeps(data, this.warn)
this.fixBundleDependenciesField(data)
+
+ ;['dependencies','devDependencies'].forEach(function(deps) {
+ if (!(deps in data)) return
+ if (!data[deps] || typeof data[deps] !== "object") {
+ this.warn(deps + " field must be an object")
+ delete data[deps]
+ return
+ }
+ Object.keys(data[deps]).forEach(function (d) {
+ var r = data[deps][d]
+ if (typeof r !== 'string') {
+ this.warn('Invalid dependency: ' + d + ' ' + JSON.stringify(r))
+ delete data[deps][d]
+ }
+ }, this)
+ }, this)
}
-, fixKeywordsField: function (data, warn) {
+, fixModulesField: function (data) {
+ if (data.modules) {
+ this.warn("modules field is deprecated")
+ delete data.modules
+ }
+ }
+
+, fixKeywordsField: function (data) {
if (typeof data.keywords === "string") {
data.keywords = data.keywords.split(/,\s+/)
}
+ if (data.keywords && !Array.isArray(data.keywords)) {
+ delete data.keywords
+ this.warn("keywords should be an array of strings")
+ } else if (data.keywords) {
+ data.keywords = data.keywords.filter(function(kw) {
+ if (typeof kw !== "string" || !kw) {
+ this.warn("keywords should be an array of strings");
+ return false
+ } else {
+ return true
+ }
+ }, this)
+ }
}
-, fixVersionField: function(data) {
+, fixVersionField: function(data, strict) {
+ // allow "loose" semver 1.0 versions in non-strict mode
+ // enforce strict semver 2.0 compliance in strict mode
+ var loose = !strict
if (!data.version) {
data.version = ""
return true
}
- if (!semver.valid(data.version)) {
- throw new Error("invalid version: "+ data.version)
+ if (!semver.valid(data.version, loose)) {
+ throw new Error('Invalid version: "'+ data.version + '"')
}
- data.version = semver.clean(data.version)
+ data.version = semver.clean(data.version, loose)
return true
}
modifyPeople(data, parsePerson)
}
-, fixNameField: function(data) {
- if (!data.name) {
+, fixNameField: function(data, strict) {
+ if (!data.name && !strict) {
data.name = ""
- return true
+ return
}
if (typeof data.name !== "string") {
throw new Error("name field must be a string.")
}
- data.name = data.name.trim()
- ensureValidName(data.name)
+ if (!strict)
+ data.name = data.name.trim()
+ ensureValidName(data.name, strict)
}
}
if (data.readme && !data.description)
data.description = extractDescription(data.readme)
+ if (!data.description) this.warn('No description')
}
, fixReadmeField: function (data) {
- if (!data.readme) data.readme = "ERROR: No README data found!"
+ if (!data.readme) {
+ this.warn("No README data")
+ data.readme = "ERROR: No README data found!"
+ }
}
, fixBugsField: function(data) {
this.warn("Bug string field must be url, email, or {email,url}")
}
else {
+ bugsTypos(data.bugs, this.warn)
var oldBugs = data.bugs
data.bugs = {}
if(oldBugs.url) {
, fixHomepageField: function(data) {
if(!data.homepage) return true;
- if(typeof data.homepage !== "string" || !url.parse(data.homepage).protocol) {
+ if(typeof data.homepage !== "string") {
this.warn("homepage field must be a string url. Deleted.")
- delete data.homepage
+ return delete data.homepage
+ }
+ if(!url.parse(data.homepage).protocol) {
+ this.warn("homepage field must start with a protocol.")
+ data.homepage = "http://" + data.homepage
}
}
}
-function ensureValidName (name) {
+function ensureValidName (name, strict) {
if (name.charAt(0) === "." ||
name.match(/[\/@\s\+%:]/) ||
name !== encodeURIComponent(name) ||
+ (strict && name !== name.toLowerCase()) ||
name.toLowerCase() === "node_modules" ||
name.toLowerCase() === "favicon.ico") {
throw new Error("Invalid name: " + JSON.stringify(name))
data[type] = depObjectify(data[type])
})
}
+
+function bugsTypos(bugs, warn) {
+ if (!bugs) return
+ Object.keys(bugs).forEach(function (k) {
+ if (typos.bugs[k]) {
+ warn(makeTypoWarning(k, typos.bugs[k], "bugs"))
+ bugs[typos.bugs[k]] = bugs[k]
+ delete bugs[k]
+ }
+ })
+}
+
+function makeTypoWarning (providedName, probableName, field) {
+ if (field) {
+ providedName = field + "['" + providedName + "']"
+ probableName = field + "['" + probableName + "']"
+ }
+ return providedName + " should probably be " + probableName + "."
+}
+++ /dev/null
-// a warning for deprecated or likely-incorrect fields
-
-module.exports = isValid
-
-var typos = require("./typos")
-
-function isValid (data, warnFunc) {
- var hasWarned = false
- function warn(msg) {
- hasWarned = true
- if(warnFunc) warnFunc(msg)
- }
- if (data.modules) warn("'modules' is deprecated")
- Object.keys(typos.topLevel).forEach(function (d) {
- if (data.hasOwnProperty(d)) {
- warn(makeTypoWarning(d, typos.topLevel[d]))
- }
- })
- checkBugsField(data.bugs, warn)
- checkScriptsField(data.scripts, warn)
- if (!data.repository) warn("No repository field.")
- if (!data.readme) warn("No readme data.")
- if (data.description && typeof data.description !== 'string') {
- warn("'description' field should be a string")
- }
- if (data[data.bundledDependencies] &&
- !Array.isArray(data.bundleDependencies)) {
- warn("bundleDependencies must be an array")
- }
- return !hasWarned
-}
-
-function checkBugsField (bugs, warn) {
- if (!bugs || typeof bugs !== "object") return
- Object.keys(bugs).forEach(function (k) {
- if (typos.bugs[k]) {
- bugs[typos.bugs[k]] = bugs[k]
- delete bugs[k]
- }
- })
-}
-
-function checkScriptsField (scripts, warn) {
- if (!scripts || typeof scripts !== "object") return
- Object.keys(scripts).forEach(function (k) {
- if (typos.script[k]) {
- warn(makeTypoWarning(k, typos.script[k], "scripts"))
- }
- })
-}
-
-function makeTypoWarning (providedName, probableName, field) {
- if (field) {
- providedName = field + "['" + providedName + "']"
- probableName = field + "['" + probableName + "']"
- }
- return providedName + " should probably be " + probableName + "."
-}
module.exports = normalize
-var isValid = require("./is_valid")
var fixer = require("./fixer")
-var fieldsToFix = ['name','version','description','repository'
+var fieldsToFix = ['name','version','description','repository','modules','scripts'
,'files','bin','man','bugs','keywords','readme','homepage']
-var otherThingsToFix = ['dependencies','people']
+var otherThingsToFix = ['dependencies','people', 'typos']
var thingsToFix = fieldsToFix.map(function(fieldName) {
return ucFirst(fieldName) + "Field"
// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix)
thingsToFix = thingsToFix.concat(otherThingsToFix)
-function normalize (data, warn) {
+function normalize (data, warn, strict) {
+ if(warn === true) warn = null, strict = true
+ if(!strict) strict = false
if(!warn) warn = function(msg) { /* noop */ }
- isValid(data, warn) // don't care if it's valid, we'll make it valid
+
if (data.scripts &&
data.scripts.install === "node-gyp rebuild" &&
!data.scripts.preinstall) {
}
fixer.warn = warn
thingsToFix.forEach(function(thingName) {
- fixer["fix" + ucFirst(thingName)](data)
+ fixer["fix" + ucFirst(thingName)](data, strict)
})
data._id = data.name + "@" + data.version
- if (data.modules) delete data.modules // modules field is deprecated
}
function ucFirst (string) {
,"autor": "author"
,"contributers": "contributors"
,"publicationConfig": "publishConfig"
+ ,"script": "scripts"
},
"bugs": { "web": "url", "name": "url" },
"script": { "server": "start", "tests": "test" }
-}
\ No newline at end of file
+}
{
"name": "normalize-package-data",
- "version": "0.1.6",
+ "version": "0.2.0",
"author": {
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
"test": "tap test/*.js"
},
"dependencies": {
- "semver": "1.x",
+ "semver": "2",
"github-url-from-git": "~1.1.1"
},
"devDependencies": {
"email": "merynstol@gmail.com"
}
],
- "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the normalizeData function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nIf you don't provide a warning function, `normalizeData` functions silently.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed.\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ",
+ "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the normalizeData function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nIf you don't provide a warning function, `normalizeData` functions silently.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed.\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/meryn/normalize-package-data/issues"
},
- "_id": "normalize-package-data@0.1.6",
- "_from": "normalize-package-data@~0.1.2"
+ "_id": "normalize-package-data@0.2.0",
+ "_from": "normalize-package-data@~0.2"
}
}
normalize(packageData, warn)
t.same(packageData, expect)
- t.same(warnings, ["No repository field.","No readme data."])
+ t.same(warnings, [
+ "No description",
+ "No repository field.",
+ "No README data"
+ ])
t.end()
})
var a
normalize(a={
readme: "read yourself how about",
- homepage: "stragle planarf",
+ homepage: 123,
bugs: "what is this i don't even",
repository: "Hello."
}, warn)
console.error(a)
var expect =
- [ 'No repository field.',
- 'No readme data.',
- 'bugs.url field must be a string url. Deleted.',
- 'bugs.email field must be a string email. Deleted.',
- 'Normalized value of bugs field is an empty object. Deleted.',
- 'Bug string field must be url, email, or {email,url}',
- 'Normalized value of bugs field is an empty object. Deleted.',
- 'homepage field must be a string url. Deleted.' ]
+ [ "No description",
+ "No repository field.",
+ "bugs.url field must be a string url. Deleted.",
+ "bugs.email field must be a string email. Deleted.",
+ "Normalized value of bugs field is an empty object. Deleted.",
+ "No README data",
+ "Bug string field must be url, email, or {email,url}",
+ "Normalized value of bugs field is an empty object. Deleted.",
+ "homepage field must be a string url. Deleted." ]
t.same(warnings, expect)
t.end()
})
+tap.test("homepage field must start with a protocol.", function(t) {
+ var warnings = []
+ function warn(w) {
+ warnings.push(w)
+ }
+ var a
+ normalize(a={
+ homepage: 'example.org'
+ }, warn)
+
+ console.error(a)
+
+ var expect =
+ [ "No description",
+ "No repository field.",
+ "No README data",
+ "homepage field must start with a protocol." ]
+ t.same(warnings, expect)
+ t.same(a.homepage, 'http://example.org')
+ t.end()
+})
+
tap.test("gist bugs url", function(t) {
var d = {
repository: "git@gist.github.com:123456.git"
t.end();
});
-tap.test('no new globals', function(t) {
- t.same(Object.keys(global), globals)
- t.end()
-})
-
tap.test("singularize repositories", function(t) {
- d = {repositories:["git@gist.github.com:123456.git"]}
+ var d = {repositories:["git@gist.github.com:123456.git"]}
normalize(d)
t.same(d.repository, { type: 'git', url: 'git@gist.github.com:123456.git' })
t.end()
-});
\ No newline at end of file
+});
+
+tap.test('no new globals', function(t) {
+ t.same(Object.keys(global), globals)
+ t.end()
+})
--- /dev/null
+var test = require("tap").test
+
+var normalize = require("../")
+
+test("strict", function(t) {
+ var threw
+
+ try {
+ threw = false
+ normalize({name: "X"}, true)
+ } catch (er) {
+ threw = true
+ t.equal(er.message, 'Invalid name: "X"')
+ } finally {
+ t.equal(threw, true)
+ }
+
+ try {
+ threw = false
+ normalize({name:" x "}, true)
+ } catch (er) {
+ threw = true
+ t.equal(er.message, 'Invalid name: " x "')
+ } finally {
+ t.equal(threw, true)
+ }
+
+ try {
+ threw = false
+ normalize({name:"x",version:"01.02.03"}, true)
+ } catch (er) {
+ threw = true
+ t.equal(er.message, 'Invalid version: "01.02.03"')
+ } finally {
+ t.equal(threw, true)
+ }
+
+ // these should not throw
+ var slob = {name:" X ",version:"01.02.03",dependencies:{
+ y:">01.02.03",
+ z:"! 99 $$ASFJ(Aawenf90awenf as;naw.3j3qnraw || an elephant"
+ }}
+ normalize(slob, false)
+ t.same(slob,
+ { name: 'X',
+ version: '1.2.3',
+ dependencies:
+ { y: '>01.02.03',
+ z: '! 99 $$ASFJ(Aawenf90awenf as;naw.3j3qnraw || an elephant' },
+ readme: 'ERROR: No README data found!',
+ _id: 'X@1.2.3' })
+
+ t.end()
+})
}
var expect =
- [ 'dependancies should probably be dependencies.',
+ [ 'No repository field.',
+ 'dependancies should probably be dependencies.',
'dependecies should probably be dependencies.',
'depdenencies should probably be dependencies.',
'devEependencies should probably be devDependencies.',
'autohr should probably be author.',
'autor should probably be author.',
'contributers should probably be contributors.',
- 'publicationConfig should probably be publishConfig.',
- 'No repository field.',
- 'No repository field.',
- 'No readme data.',
- 'bugs.url field must be a string url. Deleted.',
- 'Normalized value of bugs field is an empty object. Deleted.',
- 'No repository field.',
- 'No readme data.' ]
+ 'publicationConfig should probably be publishConfig.' ]
normalize({"dependancies": "dependencies"
,"dependecies": "dependencies"
,name:"name"
,version:"1.2.5"}, warn)
+ t.same(warnings, expect)
+
+ warnings.length = 0
+ var expect =
+ [ 'No description',
+ 'No repository field.',
+ 'bugs[\'web\'] should probably be bugs[\'url\'].',
+ 'bugs[\'name\'] should probably be bugs[\'url\'].',
+ 'bugs.url field must be a string url. Deleted.',
+ 'Normalized value of bugs field is an empty object. Deleted.',
+ "No README data" ]
+
normalize({name:"name"
,version:"1.2.5"
,bugs:{web:"url",name:"url"}}, warn)
+ t.same(warnings, expect)
+
+ warnings.length = 0
+ var expect =
+ [ 'No description',
+ 'No repository field.',
+ "No README data",
+ 'script should probably be scripts.' ]
+
normalize({name:"name"
,version:"1.2.5"
,script:{server:"start",tests:"test"}}, warn)
+
+ t.same(warnings, expect)
+
+ warnings.length = 0
+ expect =
+ [ 'No description',
+ 'No repository field.',
+ 'scripts[\'server\'] should probably be scripts[\'start\'].',
+ 'scripts[\'tests\'] should probably be scripts[\'test\'].',
+ "No README data" ]
+
+ normalize({name:"name"
+ ,version:"1.2.5"
+ ,scripts:{server:"start",tests:"test"}}, warn)
+
t.same(warnings, expect)
+
t.end();
})
{
"name": "read-package-json",
- "version": "0.4.1",
+ "version": "1.1.0",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"dependencies": {
"glob": "~3.2.1",
"lru-cache": "2",
- "normalize-package-data": "~0.1.2",
- "npmlog": "0",
+ "normalize-package-data": "~0.2",
"graceful-fs": "~1.2"
},
"devDependencies": {
"tap": "~0.2.5"
},
"optionalDependencies": {
- "npmlog": "0",
"graceful-fs": "~1.2"
},
- "readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\nreadJson('/path/to/package.json', function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n}\n```\n\n## readJson(file, cb)\n\n* `file` {String} The path to the package.json file\n* `cb` {Function}\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
+ "readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\n// readJson(filename, [logFunction=noop], [strict=false], cb)\nreadJson('/path/to/package.json', console.error, false, function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n}\n```\n\n## readJson(file, [logFn = noop], [strict = false], cb)\n\n* `file` {String} The path to the package.json file\n* `logFn` {Function} Function to handle logging. Defaults to a noop.\n* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and\n other strict requirements.\n* `cb` {Function} Gets called with `(er, data)`, as is The Node Way.\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/read-package-json/issues"
},
- "_id": "read-package-json@0.4.1",
- "_from": "read-package-json@~0.4.1"
+ "_id": "read-package-json@1.1.0",
+ "_from": "read-package-json@1"
}
// vim: set softtabstop=16 shiftwidth=16:
try {
- readJson.log = require("npmlog")
-} catch (er) {
- readJson.log = {
- info: function () {},
- verbose: function () {},
- warn: function () {}
- }
-}
-
-
-try {
var fs = require("graceful-fs")
} catch (er) {
var fs = require("fs")
var typoWarned = {}
-function readJson (file, cb) {
+function readJson (file, log_, strict_, cb_) {
+ var log, strict, cb
+ for (var i = 1; i < arguments.length - 1; i++) {
+ if (typeof arguments[i] === 'boolean')
+ strict = arguments[i]
+ else if (typeof arguments[i] === 'function')
+ log = arguments[i]
+ }
+ if (!log) log = function () {};
+ cb = arguments[ arguments.length - 1 ]
+
var c = readJson.cache.get(file)
if (c) {
- readJson.log.verbose("from cache", file)
cb = cb.bind(null, null, c)
return process.nextTick(cb);
}
- readJson.log.verbose("read json", file)
cb = (function (orig) { return function (er, data) {
if (data) readJson.cache.set(file, data);
return orig(er, data)
} })(cb)
- readJson_(file, cb)
+ readJson_(file, log, strict, cb)
}
-function readJson_ (file, cb) {
+function readJson_ (file, log, strict, cb) {
fs.readFile(file, "utf8", function (er, d) {
- parseJson(file, er, d, cb)
+ parseJson(file, er, d, log, strict, cb)
})
}
}
-function parseJson (file, er, d, cb) {
+function parseJson (file, er, d, log, strict, cb) {
if (er && er.code === "ENOENT") {
- indexjs(file, er, cb)
+ indexjs(file, er, log, strict, cb)
return
}
if (er) return cb(er);
d = parseIndex(d)
if (!d) return cb(parseError(er, file));
}
- extras(file, d, cb)
+ extras(file, d, log, strict, cb)
}
-function indexjs (file, er, cb) {
+function indexjs (file, er, log, strict, cb) {
if (path.basename(file) === "index.js") {
return cb(er);
}
if (er2) return cb(er);
d = parseIndex(d)
if (!d) return cb(er);
- extras(file, d, cb)
+ extras(file, d, log, strict, cb)
})
}
readJson.extras = extras
-function extras (file, data, cb) {
+function extras (file, data, log_, strict_, cb_) {
+ var log, strict, cb
+ for (var i = 2; i < arguments.length - 1; i++) {
+ if (typeof arguments[i] === 'boolean')
+ strict = arguments[i]
+ else if (typeof arguments[i] === 'function')
+ log = arguments[i]
+ }
+ cb = arguments[i]
var set = readJson.extraSet
var n = set.length
var errState = null
function then(er) {
if (errState) return;
if (er) return cb(errState = er);
- if (--n === 0) final(file, data, cb);
+ if (--n > 0) return;
+ final(file, data, log, strict, cb);
}
}
})
}
-function final (file, data, cb) {
+function final (file, data, log, strict, cb) {
var pId = makePackageId(data)
function warn(msg) {
if (typoWarned[pId]) return;
- readJson.log.warn("package.json", pId, msg)
+ if (log) log("package.json", pId, msg);
}
try {
- normalizeData(data, warn)
+ normalizeData(data, warn, strict)
}
catch (error) {
return cb(error)
It can remove stuff synchronously, too. But that's not so good. Use
the async API. It's better.
+
+## CLI
+
+If installed with `npm install rimraf -g` it can be used as a global
+command `rimraf <path>` which is useful for cross platform support.
--- /dev/null
+#!/usr/bin/env node
+
+var rimraf = require('./')
+
+var help = false
+var dashdash = false
+var args = process.argv.slice(2).filter(function(arg) {
+ if (dashdash)
+ return !!arg
+ else if (arg === '--')
+ dashdash = true
+ else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/))
+ help = true
+ else
+ return !!arg
+});
+
+if (help || args.length === 0) {
+ // If they didn't ask for help, then this is not a "success"
+ var log = help ? console.log : console.error
+ log('Usage: rimraf <path>')
+ log('')
+ log(' Deletes all files and folders at "path" recursively.')
+ log('')
+ log('Options:')
+ log('')
+ log(' -h, --help Display this usage info')
+ process.exit(help ? 0 : 1)
+} else {
+ args.forEach(function(arg) {
+ rimraf.sync(arg)
+ })
+}
{
"name": "rimraf",
- "version": "2.1.4",
+ "version": "2.2.0",
"main": "rimraf.js",
"description": "A deep deletion module for node (like `rm -rf`)",
"author": {
"scripts": {
"test": "cd test && bash run.sh"
},
+ "bin": {
+ "rimraf": "./bin.js"
+ },
"contributors": [
{
"name": "Isaac Z. Schlueter",
"email": "yosefd@microsoft.com"
}
],
- "readme": "A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n",
+ "readme": "A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n",
"readmeFilename": "README.md",
- "_id": "rimraf@2.1.4",
+ "bugs": {
+ "url": "https://github.com/isaacs/rimraf/issues"
+ },
"dependencies": {
"graceful-fs": "~1"
},
- "_from": "rimraf@2"
+ "_id": "rimraf@2.2.0",
+ "_from": "rimraf@2.2"
}
-Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+Copyright (c) Isaac Z. Schlueter ("Author")
All rights reserved.
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
+The BSD License
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+files = semver.browser.js \
+ semver.min.js \
+ semver.browser.js.gz \
+ semver.min.js.gz
+
+all: $(files)
+
+clean:
+ rm $(files)
+
+semver.browser.js: head.js semver.js foot.js
+ ( cat head.js; \
+ cat semver.js | \
+ egrep -v '^ *\/\* nomin \*\/' | \
+ perl -pi -e 's/debug\([^\)]+\)//g'; \
+ cat foot.js ) > semver.browser.js
+
+semver.min.js: semver.browser.js
+ uglifyjs -m <semver.browser.js >semver.min.js
+
+%.gz: %
+ gzip --stdout -9 <$< >$@
+
+.PHONY: all clean
## Versions
-A version is the following things, in this order:
-
-* a number (Major)
-* a period
-* a number (minor)
-* a period
-* a number (patch)
-* OPTIONAL: a hyphen, followed by a number (build)
-* OPTIONAL: a collection of pretty much any non-whitespace characters
- (tag)
+A "version" is described by the v2.0.0 specification found at
+<http://semver.org/>.
A leading `"="` or `"v"` character is stripped off and ignored.
-## Comparisons
-
-The ordering of versions is done using the following algorithm, given
-two versions and asked to find the greater of the two:
-
-* If the majors are numerically different, then take the one
- with a bigger major number. `2.3.4 > 1.3.4`
-* If the minors are numerically different, then take the one
- with the bigger minor number. `2.3.4 > 2.2.4`
-* If the patches are numerically different, then take the one with the
- bigger patch number. `2.3.4 > 2.3.3`
-* If only one of them has a build number, then take the one with the
- build number. `2.3.4-0 > 2.3.4`
-* If they both have build numbers, and the build numbers are numerically
- different, then take the one with the bigger build number.
- `2.3.4-10 > 2.3.4-9`
-* If only one of them has a tag, then take the one without the tag.
- `2.3.4 > 2.3.4-beta`
-* If they both have tags, then take the one with the lexicographically
- larger tag. `2.3.4-beta > 2.3.4-alpha`
-* At this point, they're equal.
-
## Ranges
The following range styles are supported:
+* `1.2.3` A specific version. When nothing else will do. Note that
+ build metadata is still ignored, so `1.2.3+build2012` will satisfy
+ this range.
* `>1.2.3` Greater than a specific version.
-* `<1.2.3` Less than
+* `<1.2.3` Less than a specific version. If there is no prerelease
+ tag on the version range, then no prerelease version will be allowed
+ either, even though these are technically "less than".
+* `>=1.2.3` Greater than or equal to. Note that prerelease versions
+ are NOT equal to their "normal" equivalents, so `1.2.3-beta` will
+ not satisfy this range, but `2.3.0-beta` will.
+* `<=1.2.3` Less than or equal to. In this case, prerelease versions
+ ARE allowed, so `1.2.3-beta` would satisfy.
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-* `~1.2.3` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.3.0`
-* `~1` := `>=1.0.0 <2.0.0`
-* `1.2.x` := `>=1.2.0 <1.3.0`
-* `1.x` := `>=1.0.0 <2.0.0`
+* `~1.2.3` := `>=1.2.3-0 <1.3.0-0` "Reasonably close to 1.2.3". When
+ using tilde operators, prerelease versions are supported as well,
+ but a prerelease of the next significant digit will NOT be
+ satisfactory, so `1.3.0-beta` will not satisfy `~1.2.3`.
+* `~1.2` := `>=1.2.0-0 <1.3.0-0` "Any version starting with 1.2"
+* `1.2.x` := `>=1.2.0-0 <1.3.0-0` "Any version starting with 1.2"
+* `~1` := `>=1.0.0-0 <2.0.0-0` "Any version starting with 1"
+* `1.x` := `>=1.0.0-0 <2.0.0-0` "Any version starting with 1"
+
Ranges can be joined with either a space (which implies "and") or a
`||` (which implies "or").
## Functions
+All methods and classes take a final `loose` boolean argument that, if
+true, will be more forgiving about not-quite-valid semver strings.
+The resulting output will always be 100% strict, of course.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
* valid(v): Return the parsed version, or null if it's not valid.
* inc(v, release): Return the version incremented by the release type
(major, minor, patch, or build), or null if it's not valid.
--- /dev/null
+
+})(
+ typeof exports === 'object' ? exports :
+ typeof define === 'function' && define.amd ? {} :
+ semver = {}
+);
--- /dev/null
+;(function(exports) {
+
{
"name": "semver",
- "version": "1.1.4",
+ "version": "2.0.8",
"description": "The semantic version parser used by npm.",
"main": "semver.js",
+ "browser": "semver.browser.js",
+ "min": "semver.min.js",
"scripts": {
- "test": "tap test.js"
+ "test": "tap test/*.js",
+ "prepublish": "make"
},
"devDependencies": {
- "tap": "0.x >=0.0.4"
- },
- "license": {
- "type": "MIT",
- "url": "https://github.com/isaacs/semver/raw/master/LICENSE"
+ "tap": "0.x >=0.0.4",
+ "uglify-js": "~2.3.6"
},
+ "license": "BSD",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-semver.git"
"bin": {
"semver": "./bin/semver"
},
- "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // '1.2.3'\n semver.valid('a.b.c') // null\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v <version> [-r <range>]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n build number. `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n different, then take the one with the bigger build number.\n `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n larger tag. `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <1.3.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n",
+ "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // '1.2.3'\n semver.valid('a.b.c') // null\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v <version> [-r <range>]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA \"version\" is described by the v2.0.0 specification found at\n<http://semver.org/>.\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `1.2.3` A specific version. When nothing else will do. Note that\n build metadata is still ignored, so `1.2.3+build2012` will satisfy\n this range.\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than a specific version. If there is no prerelease\n tag on the version range, then no prerelease version will be allowed\n either, even though these are technically \"less than\".\n* `>=1.2.3` Greater than or equal to. Note that prerelease versions\n are NOT equal to their \"normal\" equivalents, so `1.2.3-beta` will\n not satisfy this range, but `2.3.0-beta` will.\n* `<=1.2.3` Less than or equal to. In this case, prerelease versions\n ARE allowed, so `1.2.3-beta` would satisfy.\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3-0 <1.3.0-0` \"Reasonably close to 1.2.3\". When\n using tilde operators, prerelease versions are supported as well,\n but a prerelease of the next significant digit will NOT be\n satisfactory, so `1.3.0-beta` will not satisfy `~1.2.3`.\n* `~1.2` := `>=1.2.0-0 <1.3.0-0` \"Any version starting with 1.2\"\n* `1.2.x` := `>=1.2.0-0 <1.3.0-0` \"Any version starting with 1.2\"\n* `~1` := `>=1.0.0-0 <2.0.0-0` \"Any version starting with 1\"\n* `1.x` := `>=1.0.0-0 <2.0.0-0` \"Any version starting with 1\"\n\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\nAll methods and classes take a final `loose` boolean argument that, if\ntrue, will be more forgiving about not-quite-valid semver strings.\nThe resulting output will always be 100% strict, of course.\n\nStrict-mode Comparators and Ranges will be strict about the SemVer\nstrings that they parse.\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n",
"readmeFilename": "README.md",
- "_id": "semver@1.1.4",
- "_from": "semver@1.1.4"
+ "bugs": {
+ "url": "https://github.com/isaacs/node-semver/issues"
+ },
+ "_id": "semver@2.0.8",
+ "_from": "semver@latest"
}
--- /dev/null
+;(function(exports) {
+
+// export the class if we are in a Node-like system.
+if (typeof module === 'object' && module.exports === exports)
+ exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:(' + src[PRERELEASE] + ')' +
+ ')?)?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:(' + src[PRERELEASELOOSE] + ')' +
+ ')?)?)?';
+
+// >=2.x, for example, means >=2.0.0-0
+// <1.x would be the same as "<1.0.0-0", though.
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = src[LONETILDE] + '\s+';
+var tildeTrimReplace = '$1';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+
+var comparatorTrimReplace = '$1$2 ';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ ;
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ var r = loose ? re[LOOSE] : re[FULL];
+ return (r.test(version)) ? new SemVer(version, loose) : null;
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
+
+
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version, loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
+ }
+
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ ;
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ return (/^[0-9]+$/.test(id)) ? +id : id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.inspect = function() {
+ return '<SemVer "' + this + '">';
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ ;
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.lenth && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ ;
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+SemVer.prototype.inc = function(release) {
+ switch (release) {
+ case 'major':
+ this.major++;
+ this.minor = -1;
+ case 'minor':
+ this.minor++;
+ this.patch = -1;
+ case 'patch':
+ this.patch++;
+ this.prerelease = [];
+ break;
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose) {
+ try {
+ return new SemVer(version, loose).inc(release).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===': ret = a === b; break;
+ case '!==': ret = a !== b; break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ ;
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else {
+ this.semver = new SemVer(m[2], this.loose);
+
+ // <1.2.3-rc DOES allow 1.2.3-beta (has prerelease)
+ // >=1.2.3 DOES NOT allow 1.2.3-beta
+ // <=1.2.3 DOES allow 1.2.3-beta
+ // However, <1.2.3 does NOT allow 1.2.3-beta,
+ // even though `1.2.3-beta < 1.2.3`
+ // The assumption is that the 1.2.3 version has something you
+ // *don't* want, so we push the prerelease down to the minimum.
+ if (this.operator === '<' && !this.semver.prerelease.length) {
+ this.semver.prerelease = ['0'];
+ this.semver.format();
+ }
+ }
+};
+
+Comparator.prototype.inspect = function() {
+ return '<SemVer Comparator "' + this + '">';
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ ;
+ return (this.semver === ANY) ? true :
+ cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.inspect = function() {
+ return '<SemVer Range "' + this.range + '">';
+};
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ ;
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ ;
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ ;
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ ;
+ comp = replaceTildes(comp, loose);
+ ;
+ comp = replaceXRanges(comp, loose);
+ ;
+ comp = replaceStars(comp, loose);
+ ;
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ ;
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0- <1.3.0-
+ ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0';
+ else if (pr) {
+ ;
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0-0';
+ } else
+ // ~1.2.3 == >=1.2.3-0 <1.3.0-0
+ ret = '>=' + M + '.' + m + '.' + p + '-0' +
+ ' <' + M + '.' + (+m + 1) + '.0-0';
+
+ ;
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ ;
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ ;
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (gtlt && anyX) {
+ // replace X with 0, and then append the -0 min-prerelease
+ if (xM)
+ M = 0;
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0-0
+ // >1.2 => >=1.3.0-0
+ // >1.2.3 => >= 1.2.4-0
+ gtlt = '>=';
+ if (xM) {
+ // no change
+ } else if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ }
+
+
+ ret = gtlt + M + '.' + m + '.' + p + '-0';
+ } else if (xM) {
+ // allow any
+ ret = '*';
+ } else if (xm) {
+ // append '-0' onto the version, otherwise
+ // '1.x.x' matches '2.0.0-beta', since the tag
+ // *lowers* the version value
+ ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0';
+ }
+
+ ;
+
+ return ret;
+ });
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ ;
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0-0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0-0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0-0 <3.5.0-0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0-0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0-0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0-0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0-0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
+ }
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+}
+
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(rcompare)[0] || null;
+}
+
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
+}
+
+// Use the define() function if we're in AMD land
+if (typeof define === 'function' && define.amd)
+ define(exports);
+
+})(
+ typeof exports === 'object' ? exports :
+ typeof define === 'function' && define.amd ? {} :
+ semver = {}
+);
-;(function (exports) { // nothing in here is node-specific.
-
-// See http://semver.org/
-// This implementation is a *hair* less strict in that it allows
-// v1.2.3 things, and also tags that don't begin with a char.
-
-var semver = "\\s*[v=]*\\s*([0-9]+)" // major
- + "\\.([0-9]+)" // minor
- + "\\.([0-9]+)" // patch
- + "(-[0-9]+-?)?" // build
- + "([a-zA-Z-+][a-zA-Z0-9-\.:]*)?" // tag
- , exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$"
- , xRangePlain = "[v=]*([0-9]+|x|X|\\*)"
- + "(?:\\.([0-9]+|x|X|\\*)"
- + "(?:\\.([0-9]+|x|X|\\*)"
- + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?)?)?"
- , xRange = "((?:<|>)=?)?\\s*" + xRangePlain
- , exprLoneSpermy = "(?:~>?)"
- , exprSpermy = exprLoneSpermy + xRange
- , expressions = exports.expressions =
- { parse : new RegExp("^\\s*"+semver+"\\s*$")
- , parsePackage : new RegExp("^\\s*([^\/]+)[-@](" +semver+")\\s*$")
- , parseRange : new RegExp(
- "^\\s*(" + semver + ")\\s+-\\s+(" + semver + ")\\s*$")
- , validComparator : new RegExp("^"+exprComparator+"$")
- , parseXRange : new RegExp("^"+xRange+"$")
- , parseSpermy : new RegExp("^"+exprSpermy+"$")
- }
+// export the class if we are in a Node-like system.
+if (typeof module === 'object' && module.exports === exports)
+ exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+/* nomin */ var debug;
+/* nomin */ if (typeof process === 'object' &&
+ /* nomin */ process.env &&
+ /* nomin */ process.env.NODE_DEBUG &&
+ /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
+ /* nomin */ debug = function() {
+ /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
+ /* nomin */ args.unshift('SEMVER');
+ /* nomin */ console.log.apply(console, args);
+ /* nomin */ };
+/* nomin */ else
+ /* nomin */ debug = function() {};
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:(' + src[PRERELEASE] + ')' +
+ ')?)?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:(' + src[PRERELEASELOOSE] + ')' +
+ ')?)?)?';
+
+// >=2.x, for example, means >=2.0.0-0
+// <1.x would be the same as "<1.0.0-0", though.
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = src[LONETILDE] + '\s+';
+var tildeTrimReplace = '$1';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+
+var comparatorTrimReplace = '$1$2 ';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i]);
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ var r = loose ? re[LOOSE] : re[FULL];
+ return (r.test(version)) ? new SemVer(version, loose) : null;
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
-Object.getOwnPropertyNames(expressions).forEach(function (i) {
- exports[i] = function (str) {
- return ("" + (str || "")).match(expressions[i])
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version, loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
}
-})
-
-exports.rangeReplace = ">=$1 <=$7"
-exports.clean = clean
-exports.compare = compare
-exports.rcompare = rcompare
-exports.satisfies = satisfies
-exports.gt = gt
-exports.gte = gte
-exports.lt = lt
-exports.lte = lte
-exports.eq = eq
-exports.neq = neq
-exports.cmp = cmp
-exports.inc = inc
-
-exports.valid = valid
-exports.validPackage = validPackage
-exports.validRange = validRange
-exports.maxSatisfying = maxSatisfying
-
-exports.replaceStars = replaceStars
-exports.toComparators = toComparators
-
-function stringify (version) {
- var v = version
- return [v[1]||'', v[2]||'', v[3]||''].join(".") + (v[4]||'') + (v[5]||'')
-}
-
-function clean (version) {
- version = exports.parse(version)
- if (!version) return version
- return stringify(version)
-}
-
-function valid (version) {
- if (typeof version !== "string") return null
- return exports.parse(version) && version.trim().replace(/^[v=]+/, '')
-}
-
-function validPackage (version) {
- if (typeof version !== "string") return null
- return version.match(expressions.parsePackage) && version.trim()
-}
-
-// range can be one of:
-// "1.0.3 - 2.0.0" range, inclusive, like ">=1.0.3 <=2.0.0"
-// ">1.0.2" like 1.0.3 - 9999.9999.9999
-// ">=1.0.2" like 1.0.2 - 9999.9999.9999
-// "<2.0.0" like 0.0.0 - 1.9999.9999
-// ">1.0.2 <2.0.0" like 1.0.3 - 1.9999.9999
-var starExpression = /(<|>)?=?\s*\*/g
- , starReplace = ""
- , compTrimExpression = new RegExp("((<|>)?=|<|>)\\s*("
- +semver+"|"+xRangePlain+")", "g")
- , compTrimReplace = "$1$3"
-
-function toComparators (range) {
- var ret = (range || "").trim()
- .replace(expressions.parseRange, exports.rangeReplace)
- .replace(compTrimExpression, compTrimReplace)
- .split(/\s+/)
- .join(" ")
- .split("||")
- .map(function (orchunk) {
- return orchunk
- .replace(new RegExp("(" + exprLoneSpermy + ")\\s+"), "$1")
- .split(" ")
- .map(replaceXRanges)
- .map(replaceSpermies)
- .map(replaceStars)
- .join(" ").trim()
- })
- .map(function (orchunk) {
- return orchunk
- .trim()
- .split(/\s+/)
- .filter(function (c) { return c.match(expressions.validComparator) })
- })
- .filter(function (c) { return c.length })
- return ret
-}
-
-function replaceStars (stars) {
- return stars.trim().replace(starExpression, starReplace)
-}
-
-// "2.x","2.x.x" --> ">=2.0.0- <2.1.0-"
-// "2.3.x" --> ">=2.3.0- <2.4.0-"
-function replaceXRanges (ranges) {
- return ranges.split(/\s+/)
- .map(replaceXRange)
- .join(" ")
-}
-
-function replaceXRange (version) {
- return version.trim().replace(expressions.parseXRange,
- function (v, gtlt, M, m, p, t) {
- var anyX = !M || M.toLowerCase() === "x" || M === "*"
- || !m || m.toLowerCase() === "x" || m === "*"
- || !p || p.toLowerCase() === "x" || p === "*"
- , ret = v
- if (gtlt && anyX) {
- // just replace x'es with zeroes
- ;(!M || M === "*" || M.toLowerCase() === "x") && (M = 0)
- ;(!m || m === "*" || m.toLowerCase() === "x") && (m = 0)
- ;(!p || p === "*" || p.toLowerCase() === "x") && (p = 0)
- ret = gtlt + M+"."+m+"."+p+"-"
- } else if (!M || M === "*" || M.toLowerCase() === "x") {
- ret = "*" // allow any
- } else if (!m || m === "*" || m.toLowerCase() === "x") {
- // append "-" onto the version, otherwise
- // "1.x.x" matches "2.0.0beta", since the tag
- // *lowers* the version value
- ret = ">="+M+".0.0- <"+(+M+1)+".0.0-"
- } else if (!p || p === "*" || p.toLowerCase() === "x") {
- ret = ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-"
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ debug('SemVer', version, loose);
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ return (/^[0-9]+$/.test(id)) ? +id : id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.inspect = function() {
+ return '<SemVer "' + this + '">';
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ debug('SemVer.compare', this.version, this.loose, other);
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.lenth && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ debug('prerelease compare', i, a, b);
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+SemVer.prototype.inc = function(release) {
+ switch (release) {
+ case 'major':
+ this.major++;
+ this.minor = -1;
+ case 'minor':
+ this.minor++;
+ this.patch = -1;
+ case 'patch':
+ this.patch++;
+ this.prerelease = [];
+ break;
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose) {
+ try {
+ return new SemVer(version, loose).inc(release).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===': ret = a === b; break;
+ case '!==': ret = a !== b; break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ debug('comparator', comp, loose);
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else {
+ this.semver = new SemVer(m[2], this.loose);
+
+ // <1.2.3-rc DOES allow 1.2.3-beta (has prerelease)
+ // >=1.2.3 DOES NOT allow 1.2.3-beta
+ // <=1.2.3 DOES allow 1.2.3-beta
+ // However, <1.2.3 does NOT allow 1.2.3-beta,
+ // even though `1.2.3-beta < 1.2.3`
+ // The assumption is that the 1.2.3 version has something you
+ // *don't* want, so we push the prerelease down to the minimum.
+ if (this.operator === '<' && !this.semver.prerelease.length) {
+ this.semver.prerelease = ['0'];
+ this.semver.format();
}
- return ret
- })
+ }
+};
+
+Comparator.prototype.inspect = function() {
+ return '<SemVer Comparator "' + this + '">';
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ debug('Comparator.test', version, this.loose);
+ return (this.semver === ANY) ? true :
+ cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.inspect = function() {
+ return '<SemVer Range "' + this.range + '">';
+};
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ debug('range', range, loose);
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug('hyphen replace', range);
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ debug('comparator trim', range);
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ debug('comp', comp);
+ comp = replaceTildes(comp, loose);
+ debug('tildes', comp);
+ comp = replaceXRanges(comp, loose);
+ debug('xrange', comp);
+ comp = replaceStars(comp, loose);
+ debug('stars', comp);
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
}
// ~, ~> --> * (any, kinda silly)
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceSpermies (version) {
- return version.trim().replace(expressions.parseSpermy,
- function (v, gtlt, M, m, p, t) {
- if (gtlt) throw new Error(
- "Using '"+gtlt+"' with ~ makes no sense. Don't do it.")
-
- if (!M || M.toLowerCase() === "x") {
- return ""
- }
- // ~1 == >=1.0.0- <2.0.0-
- if (!m || m.toLowerCase() === "x") {
- return ">="+M+".0.0- <"+(+M+1)+".0.0-"
- }
- // ~1.2 == >=1.2.0- <1.3.0-
- if (!p || p.toLowerCase() === "x") {
- return ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-"
- }
- // ~1.2.3 == >=1.2.3- <1.3.0-
- t = t || "-"
- return ">="+M+"."+m+"."+p+t+" <"+M+"."+(+m+1)+".0-"
- })
-}
-
-function validRange (range) {
- range = replaceStars(range)
- var c = toComparators(range)
- return (c.length === 0)
- ? null
- : c.map(function (c) { return c.join(" ") }).join("||")
-}
-
-// returns the highest satisfying version in the list, or undefined
-function maxSatisfying (versions, range) {
- return versions
- .filter(function (v) { return satisfies(v, range) })
- .sort(compare)
- .pop()
-}
-function satisfies (version, range) {
- version = valid(version)
- if (!version) return false
- range = toComparators(range)
- for (var i = 0, l = range.length ; i < l ; i ++) {
- var ok = false
- for (var j = 0, ll = range[i].length ; j < ll ; j ++) {
- var r = range[i][j]
- , gtlt = r.charAt(0) === ">" ? gt
- : r.charAt(0) === "<" ? lt
- : false
- , eq = r.charAt(!!gtlt) === "="
- , sub = (!!eq) + (!!gtlt)
- if (!gtlt) eq = true
- r = r.substr(sub)
- r = (r === "") ? r : valid(r)
- ok = (r === "") || (eq && r === version) || (gtlt && gtlt(version, r))
- if (!ok) break
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0- <1.3.0-
+ ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0';
+ else if (pr) {
+ debug('replaceTilde pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0-0';
+ } else
+ // ~1.2.3 == >=1.2.3-0 <1.3.0-0
+ ret = '>=' + M + '.' + m + '.' + p + '-0' +
+ ' <' + M + '.' + (+m + 1) + '.0-0';
+
+ debug('tilde return', ret);
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ debug('replaceXRanges', comp, loose);
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (gtlt && anyX) {
+ // replace X with 0, and then append the -0 min-prerelease
+ if (xM)
+ M = 0;
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0-0
+ // >1.2 => >=1.3.0-0
+ // >1.2.3 => >= 1.2.4-0
+ gtlt = '>=';
+ if (xM) {
+ // no change
+ } else if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ }
+
+
+ ret = gtlt + M + '.' + m + '.' + p + '-0';
+ } else if (xM) {
+ // allow any
+ ret = '*';
+ } else if (xm) {
+ // append '-0' onto the version, otherwise
+ // '1.x.x' matches '2.0.0-beta', since the tag
+ // *lowers* the version value
+ ret = '>=' + M + '.0.0-0 <' + (+M + 1) + '.0.0-0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0-0 <' + M + '.' + (+m + 1) + '.0-0';
}
- if (ok) return true
- }
- return false
-}
-
-// return v1 > v2 ? 1 : -1
-function compare (v1, v2) {
- var g = gt(v1, v2)
- return g === null ? 0 : g ? 1 : -1
-}
-
-function rcompare (v1, v2) {
- return compare(v2, v1)
-}
-
-function lt (v1, v2) { return gt(v2, v1) }
-function gte (v1, v2) { return !lt(v1, v2) }
-function lte (v1, v2) { return !gt(v1, v2) }
-function eq (v1, v2) { return gt(v1, v2) === null }
-function neq (v1, v2) { return gt(v1, v2) !== null }
-function cmp (v1, c, v2) {
- switch (c) {
- case ">": return gt(v1, v2)
- case "<": return lt(v1, v2)
- case ">=": return gte(v1, v2)
- case "<=": return lte(v1, v2)
- case "==": return eq(v1, v2)
- case "!=": return neq(v1, v2)
- case "===": return v1 === v2
- case "!==": return v1 !== v2
- default: throw new Error("Y U NO USE VALID COMPARATOR!? "+c)
- }
+
+ debug('xRange return', ret);
+
+ return ret;
+ });
}
-// return v1 > v2
-function num (v) {
- return v === undefined ? -1 : parseInt((v||"0").replace(/[^0-9]+/g, ''), 10)
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ debug('replaceStars', comp, loose);
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
}
-function gt (v1, v2) {
- v1 = exports.parse(v1)
- v2 = exports.parse(v2)
- if (!v1 || !v2) return false
- for (var i = 1; i < 5; i ++) {
- v1[i] = num(v1[i])
- v2[i] = num(v2[i])
- if (v1[i] > v2[i]) return true
- else if (v1[i] !== v2[i]) return false
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0-0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0-0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0-0 <3.5.0-0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0-0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0-0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0-0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0-0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
}
- // no tag is > than any tag, or use lexicographical order.
- var tag1 = v1[5] || ""
- , tag2 = v2[5] || ""
-
- // kludge: null means they were equal. falsey, and detectable.
- // embarrassingly overclever, though, I know.
- return tag1 === tag2 ? null
- : !tag1 ? true
- : !tag2 ? false
- : tag1 > tag2
-}
-
-function inc (version, release) {
- version = exports.parse(version)
- if (!version) return null
-
- var parsedIndexLookup =
- { 'major': 1
- , 'minor': 2
- , 'patch': 3
- , 'build': 4 }
- var incIndex = parsedIndexLookup[release]
- if (incIndex === undefined) return null
-
- var current = num(version[incIndex])
- version[incIndex] = current === -1 ? 1 : current + 1
-
- for (var i = incIndex + 1; i < 5; i ++) {
- if (num(version[i]) !== -1) version[i] = "0"
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
}
+ return range.test(version);
+}
- if (version[4]) version[4] = "-" + version[4]
- version[5] = ""
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(rcompare)[0] || null;
+}
- return stringify(version)
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
}
-})(typeof exports === "object" ? exports : semver = {})
+
+// Use the define() function if we're in AMD land
+if (typeof define === 'function' && define.amd)
+ define(exports);
--- /dev/null
+!function(e){if(typeof module==="object"&&module.exports===e)e=module.exports=O;e.SEMVER_SPEC_VERSION="2.0.0";var r=e.re=[];var t=e.src=[];var n=0;var i=n++;t[i]="0|[1-9]\\d*";var s=n++;t[s]="[0-9]+";var o=n++;t[o]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var a=n++;t[a]="("+t[i]+")\\."+"("+t[i]+")\\."+"("+t[i]+")";var u=n++;t[u]="("+t[s]+")\\."+"("+t[s]+")\\."+"("+t[s]+")";var f=n++;t[f]="(?:"+t[i]+"|"+t[o]+")";var c=n++;t[c]="(?:"+t[s]+"|"+t[o]+")";var l=n++;t[l]="(?:-("+t[f]+"(?:\\."+t[f]+")*))";var p=n++;t[p]="(?:-?("+t[c]+"(?:\\."+t[c]+")*))";var h=n++;t[h]="[0-9A-Za-z-]+";var v=n++;t[v]="(?:\\+("+t[h]+"(?:\\."+t[h]+")*))";var m=n++;var g="v?"+t[a]+t[l]+"?"+t[v]+"?";t[m]="^"+g+"$";var d="[v=\\s]*"+t[u]+t[p]+"?"+t[v]+"?";var w=n++;t[w]="^"+d+"$";var y=n++;t[y]="((?:<|>)?=?)";var $=n++;t[$]=t[s]+"|x|X|\\*";var j=n++;t[j]=t[i]+"|x|X|\\*";var b=n++;t[b]="[v=\\s]*("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:\\.("+t[j]+")"+"(?:("+t[l]+")"+")?)?)?";var S=n++;t[S]="[v=\\s]*("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:\\.("+t[$]+")"+"(?:("+t[p]+")"+")?)?)?";var E=n++;t[E]="^"+t[y]+"\\s*"+t[b]+"$";var k=n++;t[k]="^"+t[y]+"\\s*"+t[S]+"$";var x=n++;t[x]="(?:~>?)";var R=n++;t[R]=t[x]+"s+";var V="$1";var I=n++;t[I]="^"+t[x]+t[b]+"$";var C=n++;t[C]="^"+t[x]+t[S]+"$";var A=n++;t[A]="^"+t[y]+"\\s*("+d+")$|^$";var T=n++;t[T]="^"+t[y]+"\\s*("+g+")$|^$";var z=n++;t[z]=t[y]+"\\s*("+d+"|"+t[b]+")";r[z]=new RegExp(t[z],"g");var M="$1$2 ";var P=n++;t[P]="^\\s*("+t[b]+")"+"\\s+-\\s+"+"("+t[b]+")"+"\\s*$";var Z=n++;t[Z]="^\\s*("+t[S]+")"+"\\s+-\\s+"+"("+t[S]+")"+"\\s*$";var q=n++;t[q]="(<|>)?=?\\s*\\*";for(var L=0;L<n;L++){if(!r[L])r[L]=new RegExp(t[L])}e.parse=X;function X(e,t){var n=t?r[w]:r[m];return n.test(e)?new O(e,t):null}e.valid=_;function _(e,r){var t=X(e,r);return t?t.version:null}e.clean=N;function N(e,r){var t=X(e,r);return t?t.version:null}e.SemVer=O;function O(e,t){if(e instanceof O){if(e.loose===t)return e;else e=e.version}if(!(this instanceof O))return new O(e,t);this.loose=t;var n=e.trim().match(t?r[w]:r[m]);if(!n)throw new TypeError("Invalid Version: "+e);this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(!n[4])this.prerelease=[];else this.prerelease=n[4].split(".").map(function(e){return/^[0-9]+$/.test(e)?+e:e});this.build=n[5]?n[5].split("."):[];this.format()}O.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};O.prototype.inspect=function(){return'<SemVer "'+this+'">'};O.prototype.toString=function(){return this.version};O.prototype.compare=function(e){if(!(e instanceof O))e=new O(e,this.loose);return this.compareMain(e)||this.comparePre(e)};O.prototype.compareMain=function(e){if(!(e instanceof O))e=new O(e,this.loose);return F(this.major,e.major)||F(this.minor,e.minor)||F(this.patch,e.patch)};O.prototype.comparePre=function(e){if(!(e instanceof O))e=new O(e,this.loose);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.lenth&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r];var n=e.prerelease[r];if(t===undefined&&n===undefined)return 0;else if(n===undefined)return 1;else if(t===undefined)return-1;else if(t===n)continue;else return F(t,n)}while(++r)};O.prototype.inc=function(e){switch(e){case"major":this.major++;this.minor=-1;case"minor":this.minor++;this.patch=-1;case"patch":this.patch++;this.prerelease=[];break;case"prerelease":if(this.prerelease.length===0)this.prerelease=[0];else{var r=this.prerelease.length;while(--r>=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1)this.prerelease.push(0)}break;default:throw new Error("invalid increment argument: "+e)}this.format();return this};e.inc=B;function B(e,r,t){try{return new O(e,t).inc(r).version}catch(n){return null}}e.compareIdentifiers=F;var D=/^[0-9]+$/;function F(e,r){var t=D.test(e);var n=D.test(r);if(t&&n){e=+e;r=+r}return t&&!n?-1:n&&!t?1:e<r?-1:e>r?1:0}e.rcompareIdentifiers=G;function G(e,r){return F(r,e)}e.compare=H;function H(e,r,t){return new O(e,t).compare(r)}e.compareLoose=J;function J(e,r){return H(e,r,true)}e.rcompare=K;function K(e,r,t){return H(r,e,t)}e.sort=Q;function Q(r,t){return r.sort(function(r,n){return e.compare(r,n,t)})}e.rsort=U;function U(r,t){return r.sort(function(r,n){return e.rcompare(r,n,t)})}e.gt=W;function W(e,r,t){return H(e,r,t)>0}e.lt=Y;function Y(e,r,t){return H(e,r,t)<0}e.eq=er;function er(e,r,t){return H(e,r,t)===0}e.neq=rr;function rr(e,r,t){return H(e,r,t)!==0}e.gte=tr;function tr(e,r,t){return H(e,r,t)>=0}e.lte=nr;function nr(e,r,t){return H(e,r,t)<=0}e.cmp=ir;function ir(e,r,t,n){var i;switch(r){case"===":i=e===t;break;case"!==":i=e!==t;break;case"":case"=":case"==":i=er(e,t,n);break;case"!=":i=rr(e,t,n);break;case">":i=W(e,t,n);break;case">=":i=tr(e,t,n);break;case"<":i=Y(e,t,n);break;case"<=":i=nr(e,t,n);break;default:throw new TypeError("Invalid operator: "+r)}return i}e.Comparator=sr;function sr(e,r){if(e instanceof sr){if(e.loose===r)return e;else e=e.value}if(!(this instanceof sr))return new sr(e,r);this.loose=r;this.parse(e);if(this.semver===or)this.value="";else this.value=this.operator+this.semver.version}var or={};sr.prototype.parse=function(e){var t=this.loose?r[A]:r[T];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1];if(!n[2])this.semver=or;else{this.semver=new O(n[2],this.loose);if(this.operator==="<"&&!this.semver.prerelease.length){this.semver.prerelease=["0"];this.semver.format()}}};sr.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'};sr.prototype.toString=function(){return this.value};sr.prototype.test=function(e){return this.semver===or?true:ir(e,this.operator,this.semver,this.loose)};e.Range=ar;function ar(e,r){if(e instanceof ar&&e.loose===r)return e;if(!(this instanceof ar))return new ar(e,r);this.loose=r;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}ar.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'};ar.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};ar.prototype.toString=function(){return this.range};ar.prototype.parseRange=function(e){var t=this.loose;e=e.trim();var n=t?r[Z]:r[P];e=e.replace(n,gr);e=e.replace(r[z],M);e=e.replace(r[R],V);e=e.split(/\s+/).join(" ");var i=t?r[A]:r[T];var s=e.split(" ").map(function(e){return fr(e,t)}).join(" ").split(/\s+/);if(this.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new sr(e,t)});return s};e.toComparators=ur;function ur(e,r){return new ar(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function fr(e,r){e=lr(e,r);e=hr(e,r);e=mr(e,r);return e}function cr(e){return!e||e.toLowerCase()==="x"||e==="*"}function lr(e,r){return e.trim().split(/\s+/).map(function(e){return pr(e,r)}).join(" ")}function pr(e,t){var n=t?r[C]:r[I];return e.replace(n,function(e,r,t,n,i){var s;if(cr(r))s="";else if(cr(t))s=">="+r+".0.0-0 <"+(+r+1)+".0.0-0";else if(cr(n))s=">="+r+"."+t+".0-0 <"+r+"."+(+t+1)+".0-0";else if(i){if(i.charAt(0)!=="-")i="-"+i;s=">="+r+"."+t+"."+n+i+" <"+r+"."+(+t+1)+".0-0"}else s=">="+r+"."+t+"."+n+"-0"+" <"+r+"."+(+t+1)+".0-0";return s})}function hr(e,r){return e.split(/\s+/).map(function(e){return vr(e,r)}).join(" ")}function vr(e,t){e=e.trim();var n=t?r[k]:r[E];return e.replace(n,function(e,r,t,n,i,s){var o=cr(t);var a=o||cr(n);var u=a||cr(i);var f=u;if(r==="="&&f)r="";if(r&&f){if(o)t=0;if(a)n=0;if(u)i=0;if(r===">"){r=">=";if(o){}else if(a){t=+t+1;n=0;i=0}else if(u){n=+n+1;i=0}}e=r+t+"."+n+"."+i+"-0"}else if(o){e="*"}else if(a){e=">="+t+".0.0-0 <"+(+t+1)+".0.0-0"}else if(u){e=">="+t+"."+n+".0-0 <"+t+"."+(+n+1)+".0-0"}return e})}function mr(e,t){return e.trim().replace(r[q],"")}function gr(e,r,t,n,i,s,o,a,u,f,c,l,p){if(cr(t))r="";else if(cr(n))r=">="+t+".0.0-0";else if(cr(i))r=">="+t+"."+n+".0-0";else r=">="+r;if(cr(u))a="";else if(cr(f))a="<"+(+u+1)+".0.0-0";else if(cr(c))a="<"+u+"."+(+f+1)+".0-0";else if(l)a="<="+u+"."+f+"."+c+"-"+l;else a="<="+a;return(r+" "+a).trim()}ar.prototype.test=function(e){if(!e)return false;for(var r=0;r<this.set.length;r++){if(dr(this.set[r],e))return true}return false};function dr(e,r){for(var t=0;t<e.length;t++){if(!e[t].test(r))return false}return true}e.satisfies=wr;function wr(e,r,t){try{r=new ar(r,t)}catch(n){return false}return r.test(e)}e.maxSatisfying=yr;function yr(e,r,t){return e.filter(function(e){return wr(e,r,t)}).sort(K)[0]||null}e.validRange=$r;function $r(e,r){try{return new ar(e,r).range||"*"}catch(t){return null}}if(typeof define==="function"&&define.amd)define(e)}(typeof exports==="object"?exports:typeof define==="function"&&define.amd?{}:semver={});
\ No newline at end of file
+++ /dev/null
-var tap = require("tap")
- , test = tap.test
- , semver = require("./semver.js")
- , eq = semver.eq
- , gt = semver.gt
- , lt = semver.lt
- , neq = semver.neq
- , cmp = semver.cmp
- , gte = semver.gte
- , lte = semver.lte
- , satisfies = semver.satisfies
- , validRange = semver.validRange
- , inc = semver.inc
- , replaceStars = semver.replaceStars
- , toComparators = semver.toComparators
-
-tap.plan(8)
-
-test("\ncomparison tests", function (t) {
-// [version1, version2]
-// version1 should be greater than version2
-; [ ["0.0.0", "0.0.0foo"]
- , ["0.0.1", "0.0.0"]
- , ["1.0.0", "0.9.9"]
- , ["0.10.0", "0.9.0"]
- , ["0.99.0", "0.10.0"]
- , ["2.0.0", "1.2.3"]
- , ["v0.0.0", "0.0.0foo"]
- , ["v0.0.1", "0.0.0"]
- , ["v1.0.0", "0.9.9"]
- , ["v0.10.0", "0.9.0"]
- , ["v0.99.0", "0.10.0"]
- , ["v2.0.0", "1.2.3"]
- , ["0.0.0", "v0.0.0foo"]
- , ["0.0.1", "v0.0.0"]
- , ["1.0.0", "v0.9.9"]
- , ["0.10.0", "v0.9.0"]
- , ["0.99.0", "v0.10.0"]
- , ["2.0.0", "v1.2.3"]
- , ["1.2.3", "1.2.3-asdf"]
- , ["1.2.3-4", "1.2.3"]
- , ["1.2.3-4-foo", "1.2.3"]
- , ["1.2.3-5", "1.2.3-5-foo"]
- , ["1.2.3-5", "1.2.3-4"]
- , ["1.2.3-5-foo", "1.2.3-5-Foo"]
- , ["3.0.0", "2.7.2+"]
- ].forEach(function (v) {
- var v0 = v[0]
- , v1 = v[1]
- t.ok(gt(v0, v1), "gt('"+v0+"', '"+v1+"')")
- t.ok(lt(v1, v0), "lt('"+v1+"', '"+v0+"')")
- t.ok(!gt(v1, v0), "!gt('"+v1+"', '"+v0+"')")
- t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
- t.ok(eq(v0, v0), "eq('"+v0+"', '"+v0+"')")
- t.ok(eq(v1, v1), "eq('"+v1+"', '"+v1+"')")
- t.ok(neq(v0, v1), "neq('"+v0+"', '"+v1+"')")
- t.ok(cmp(v1, "==", v1), "cmp('"+v1+"' == '"+v1+"')")
- t.ok(cmp(v0, ">=", v1), "cmp('"+v0+"' >= '"+v1+"')")
- t.ok(cmp(v1, "<=", v0), "cmp('"+v1+"' <= '"+v0+"')")
- t.ok(cmp(v0, "!=", v1), "cmp('"+v0+"' != '"+v1+"')")
- })
- t.end()
-})
-
-test("\nequality tests", function (t) {
-// [version1, version2]
-// version1 should be equivalent to version2
-; [ ["1.2.3", "v1.2.3"]
- , ["1.2.3", "=1.2.3"]
- , ["1.2.3", "v 1.2.3"]
- , ["1.2.3", "= 1.2.3"]
- , ["1.2.3", " v1.2.3"]
- , ["1.2.3", " =1.2.3"]
- , ["1.2.3", " v 1.2.3"]
- , ["1.2.3", " = 1.2.3"]
- , ["1.2.3-0", "v1.2.3-0"]
- , ["1.2.3-0", "=1.2.3-0"]
- , ["1.2.3-0", "v 1.2.3-0"]
- , ["1.2.3-0", "= 1.2.3-0"]
- , ["1.2.3-0", " v1.2.3-0"]
- , ["1.2.3-0", " =1.2.3-0"]
- , ["1.2.3-0", " v 1.2.3-0"]
- , ["1.2.3-0", " = 1.2.3-0"]
- , ["1.2.3-01", "v1.2.3-1"]
- , ["1.2.3-01", "=1.2.3-1"]
- , ["1.2.3-01", "v 1.2.3-1"]
- , ["1.2.3-01", "= 1.2.3-1"]
- , ["1.2.3-01", " v1.2.3-1"]
- , ["1.2.3-01", " =1.2.3-1"]
- , ["1.2.3-01", " v 1.2.3-1"]
- , ["1.2.3-01", " = 1.2.3-1"]
- , ["1.2.3beta", "v1.2.3beta"]
- , ["1.2.3beta", "=1.2.3beta"]
- , ["1.2.3beta", "v 1.2.3beta"]
- , ["1.2.3beta", "= 1.2.3beta"]
- , ["1.2.3beta", " v1.2.3beta"]
- , ["1.2.3beta", " =1.2.3beta"]
- , ["1.2.3beta", " v 1.2.3beta"]
- , ["1.2.3beta", " = 1.2.3beta"]
- ].forEach(function (v) {
- var v0 = v[0]
- , v1 = v[1]
- t.ok(eq(v0, v1), "eq('"+v0+"', '"+v1+"')")
- t.ok(!neq(v0, v1), "!neq('"+v0+"', '"+v1+"')")
- t.ok(cmp(v0, "==", v1), "cmp("+v0+"=="+v1+")")
- t.ok(!cmp(v0, "!=", v1), "!cmp("+v0+"!="+v1+")")
- t.ok(!cmp(v0, "===", v1), "!cmp("+v0+"==="+v1+")")
- t.ok(cmp(v0, "!==", v1), "cmp("+v0+"!=="+v1+")")
- t.ok(!gt(v0, v1), "!gt('"+v0+"', '"+v1+"')")
- t.ok(gte(v0, v1), "gte('"+v0+"', '"+v1+"')")
- t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
- t.ok(lte(v0, v1), "lte('"+v0+"', '"+v1+"')")
- })
- t.end()
-})
-
-
-test("\nrange tests", function (t) {
-// [range, version]
-// version should be included by range
-; [ ["1.0.0 - 2.0.0", "1.2.3"]
- , ["1.0.0", "1.0.0"]
- , [">=*", "0.2.4"]
- , ["", "1.0.0"]
- , ["*", "1.2.3"]
- , ["*", "v1.2.3-foo"]
- , [">=1.0.0", "1.0.0"]
- , [">=1.0.0", "1.0.1"]
- , [">=1.0.0", "1.1.0"]
- , [">1.0.0", "1.0.1"]
- , [">1.0.0", "1.1.0"]
- , ["<=2.0.0", "2.0.0"]
- , ["<=2.0.0", "1.9999.9999"]
- , ["<=2.0.0", "0.2.9"]
- , ["<2.0.0", "1.9999.9999"]
- , ["<2.0.0", "0.2.9"]
- , [">= 1.0.0", "1.0.0"]
- , [">= 1.0.0", "1.0.1"]
- , [">= 1.0.0", "1.1.0"]
- , ["> 1.0.0", "1.0.1"]
- , ["> 1.0.0", "1.1.0"]
- , ["<= 2.0.0", "2.0.0"]
- , ["<= 2.0.0", "1.9999.9999"]
- , ["<= 2.0.0", "0.2.9"]
- , ["< 2.0.0", "1.9999.9999"]
- , ["<\t2.0.0", "0.2.9"]
- , [">=0.1.97", "v0.1.97"]
- , [">=0.1.97", "0.1.97"]
- , ["0.1.20 || 1.2.4", "1.2.4"]
- , [">=0.2.3 || <0.0.1", "0.0.0"]
- , [">=0.2.3 || <0.0.1", "0.2.3"]
- , [">=0.2.3 || <0.0.1", "0.2.4"]
- , ["||", "1.3.4"]
- , ["2.x.x", "2.1.3"]
- , ["1.2.x", "1.2.3"]
- , ["1.2.x || 2.x", "2.1.3"]
- , ["1.2.x || 2.x", "1.2.3"]
- , ["x", "1.2.3"]
- , ["2.*.*", "2.1.3"]
- , ["1.2.*", "1.2.3"]
- , ["1.2.* || 2.*", "2.1.3"]
- , ["1.2.* || 2.*", "1.2.3"]
- , ["*", "1.2.3"]
- , ["2", "2.1.2"]
- , ["2.3", "2.3.1"]
- , ["~2.4", "2.4.0"] // >=2.4.0 <2.5.0
- , ["~2.4", "2.4.5"]
- , ["~>3.2.1", "3.2.2"] // >=3.2.1 <3.3.0
- , ["~1", "1.2.3"] // >=1.0.0 <2.0.0
- , ["~>1", "1.2.3"]
- , ["~> 1", "1.2.3"]
- , ["~1.0", "1.0.2"] // >=1.0.0 <1.1.0
- , ["~ 1.0", "1.0.2"]
- , ["~ 1.0.3", "1.0.12"]
- , [">=1", "1.0.0"]
- , [">= 1", "1.0.0"]
- , ["<1.2", "1.1.1"]
- , ["< 1.2", "1.1.1"]
- , ["1", "1.0.0beta"]
- , ["~v0.5.4-pre", "0.5.5"]
- , ["~v0.5.4-pre", "0.5.4"]
- , ["=0.7.x", "0.7.2"]
- , [">=0.7.x", "0.7.2"]
- , ["=0.7.x", "0.7.0-asdf"]
- , [">=0.7.x", "0.7.0-asdf"]
- , ["<=0.7.x", "0.6.2"]
- , ["~1.2.1 >=1.2.3", "1.2.3"]
- , ["~1.2.1 =1.2.3", "1.2.3"]
- , ["~1.2.1 1.2.3", "1.2.3"]
- , ['~1.2.1 >=1.2.3 1.2.3', '1.2.3']
- , ['~1.2.1 1.2.3 >=1.2.3', '1.2.3']
- , ['~1.2.1 1.2.3', '1.2.3']
- , ['>=1.2.1 1.2.3', '1.2.3']
- , ['1.2.3 >=1.2.1', '1.2.3']
- , ['>=1.2.3 >=1.2.1', '1.2.3']
- , ['>=1.2.1 >=1.2.3', '1.2.3']
- ].forEach(function (v) {
- t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1])
- })
- t.end()
-})
-
-test("\nnegative range tests", function (t) {
-// [range, version]
-// version should not be included by range
-; [ ["1.0.0 - 2.0.0", "2.2.3"]
- , ["1.0.0", "1.0.1"]
- , [">=1.0.0", "0.0.0"]
- , [">=1.0.0", "0.0.1"]
- , [">=1.0.0", "0.1.0"]
- , [">1.0.0", "0.0.1"]
- , [">1.0.0", "0.1.0"]
- , ["<=2.0.0", "3.0.0"]
- , ["<=2.0.0", "2.9999.9999"]
- , ["<=2.0.0", "2.2.9"]
- , ["<2.0.0", "2.9999.9999"]
- , ["<2.0.0", "2.2.9"]
- , [">=0.1.97", "v0.1.93"]
- , [">=0.1.97", "0.1.93"]
- , ["0.1.20 || 1.2.4", "1.2.3"]
- , [">=0.2.3 || <0.0.1", "0.0.3"]
- , [">=0.2.3 || <0.0.1", "0.2.2"]
- , ["2.x.x", "1.1.3"]
- , ["2.x.x", "3.1.3"]
- , ["1.2.x", "1.3.3"]
- , ["1.2.x || 2.x", "3.1.3"]
- , ["1.2.x || 2.x", "1.1.3"]
- , ["2.*.*", "1.1.3"]
- , ["2.*.*", "3.1.3"]
- , ["1.2.*", "1.3.3"]
- , ["1.2.* || 2.*", "3.1.3"]
- , ["1.2.* || 2.*", "1.1.3"]
- , ["2", "1.1.2"]
- , ["2.3", "2.4.1"]
- , ["~2.4", "2.5.0"] // >=2.4.0 <2.5.0
- , ["~2.4", "2.3.9"]
- , ["~>3.2.1", "3.3.2"] // >=3.2.1 <3.3.0
- , ["~>3.2.1", "3.2.0"] // >=3.2.1 <3.3.0
- , ["~1", "0.2.3"] // >=1.0.0 <2.0.0
- , ["~>1", "2.2.3"]
- , ["~1.0", "1.1.0"] // >=1.0.0 <1.1.0
- , ["<1", "1.0.0"]
- , [">=1.2", "1.1.1"]
- , ["1", "2.0.0beta"]
- , ["~v0.5.4-beta", "0.5.4-alpha"]
- , ["<1", "1.0.0beta"]
- , ["< 1", "1.0.0beta"]
- , ["=0.7.x", "0.8.2"]
- , [">=0.7.x", "0.6.2"]
- , ["<=0.7.x", "0.7.2"]
- ].forEach(function (v) {
- t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1])
- })
- t.end()
-})
-
-test("\nincrement versions test", function (t) {
-// [version, inc, result]
-// inc(version, inc) -> result
-; [ [ "1.2.3", "major", "2.0.0" ]
- , [ "1.2.3", "minor", "1.3.0" ]
- , [ "1.2.3", "patch", "1.2.4" ]
- , [ "1.2.3", "build", "1.2.3-1" ]
- , [ "1.2.3-4", "build", "1.2.3-5" ]
- , [ "1.2.3tag", "major", "2.0.0" ]
- , [ "1.2.3-tag", "major", "2.0.0" ]
- , [ "1.2.3tag", "build", "1.2.3-1" ]
- , [ "1.2.3-tag", "build", "1.2.3-1" ]
- , [ "1.2.3-4-tag", "build", "1.2.3-5" ]
- , [ "1.2.3-4tag", "build", "1.2.3-5" ]
- , [ "1.2.3", "fake", null ]
- , [ "fake", "major", null ]
- ].forEach(function (v) {
- t.equal(inc(v[0], v[1]), v[2], "inc("+v[0]+", "+v[1]+") === "+v[2])
- })
-
- t.end()
-})
-
-test("\nreplace stars test", function (t) {
-// replace stars with ""
-; [ [ "", "" ]
- , [ "*", "" ]
- , [ "> *", "" ]
- , [ "<*", "" ]
- , [ " >= *", "" ]
- , [ "* || 1.2.3", " || 1.2.3" ]
- ].forEach(function (v) {
- t.equal(replaceStars(v[0]), v[1], "replaceStars("+v[0]+") === "+v[1])
- })
-
- t.end()
-})
-
-test("\nvalid range test", function (t) {
-// [range, result]
-// validRange(range) -> result
-// translate ranges into their canonical form
-; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"]
- , ["1.0.0", "1.0.0"]
- , [">=*", ""]
- , ["", ""]
- , ["*", ""]
- , ["*", ""]
- , [">=1.0.0", ">=1.0.0"]
- , [">1.0.0", ">1.0.0"]
- , ["<=2.0.0", "<=2.0.0"]
- , ["1", ">=1.0.0- <2.0.0-"]
- , ["<=2.0.0", "<=2.0.0"]
- , ["<=2.0.0", "<=2.0.0"]
- , ["<2.0.0", "<2.0.0"]
- , ["<2.0.0", "<2.0.0"]
- , [">= 1.0.0", ">=1.0.0"]
- , [">= 1.0.0", ">=1.0.0"]
- , [">= 1.0.0", ">=1.0.0"]
- , ["> 1.0.0", ">1.0.0"]
- , ["> 1.0.0", ">1.0.0"]
- , ["<= 2.0.0", "<=2.0.0"]
- , ["<= 2.0.0", "<=2.0.0"]
- , ["<= 2.0.0", "<=2.0.0"]
- , ["< 2.0.0", "<2.0.0"]
- , ["< 2.0.0", "<2.0.0"]
- , [">=0.1.97", ">=0.1.97"]
- , [">=0.1.97", ">=0.1.97"]
- , ["0.1.20 || 1.2.4", "0.1.20||1.2.4"]
- , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
- , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
- , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
- , ["||", "||"]
- , ["2.x.x", ">=2.0.0- <3.0.0-"]
- , ["1.2.x", ">=1.2.0- <1.3.0-"]
- , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
- , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
- , ["x", ""]
- , ["2.*.*", null]
- , ["1.2.*", null]
- , ["1.2.* || 2.*", null]
- , ["1.2.* || 2.*", null]
- , ["*", ""]
- , ["2", ">=2.0.0- <3.0.0-"]
- , ["2.3", ">=2.3.0- <2.4.0-"]
- , ["~2.4", ">=2.4.0- <2.5.0-"]
- , ["~2.4", ">=2.4.0- <2.5.0-"]
- , ["~>3.2.1", ">=3.2.1- <3.3.0-"]
- , ["~1", ">=1.0.0- <2.0.0-"]
- , ["~>1", ">=1.0.0- <2.0.0-"]
- , ["~> 1", ">=1.0.0- <2.0.0-"]
- , ["~1.0", ">=1.0.0- <1.1.0-"]
- , ["~ 1.0", ">=1.0.0- <1.1.0-"]
- , ["<1", "<1.0.0-"]
- , ["< 1", "<1.0.0-"]
- , [">=1", ">=1.0.0-"]
- , [">= 1", ">=1.0.0-"]
- , ["<1.2", "<1.2.0-"]
- , ["< 1.2", "<1.2.0-"]
- , ["1", ">=1.0.0- <2.0.0-"]
- ].forEach(function (v) {
- t.equal(validRange(v[0]), v[1], "validRange("+v[0]+") === "+v[1])
- })
-
- t.end()
-})
-
-test("\ncomparators test", function (t) {
-// [range, comparators]
-// turn range into a set of individual comparators
-; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ]
- , ["1.0.0", [["1.0.0"]] ]
- , [">=*", [[">=0.0.0-"]] ]
- , ["", [[""]]]
- , ["*", [[""]] ]
- , ["*", [[""]] ]
- , [">=1.0.0", [[">=1.0.0"]] ]
- , [">=1.0.0", [[">=1.0.0"]] ]
- , [">=1.0.0", [[">=1.0.0"]] ]
- , [">1.0.0", [[">1.0.0"]] ]
- , [">1.0.0", [[">1.0.0"]] ]
- , ["<=2.0.0", [["<=2.0.0"]] ]
- , ["1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["<=2.0.0", [["<=2.0.0"]] ]
- , ["<=2.0.0", [["<=2.0.0"]] ]
- , ["<2.0.0", [["<2.0.0"]] ]
- , ["<2.0.0", [["<2.0.0"]] ]
- , [">= 1.0.0", [[">=1.0.0"]] ]
- , [">= 1.0.0", [[">=1.0.0"]] ]
- , [">= 1.0.0", [[">=1.0.0"]] ]
- , ["> 1.0.0", [[">1.0.0"]] ]
- , ["> 1.0.0", [[">1.0.0"]] ]
- , ["<= 2.0.0", [["<=2.0.0"]] ]
- , ["<= 2.0.0", [["<=2.0.0"]] ]
- , ["<= 2.0.0", [["<=2.0.0"]] ]
- , ["< 2.0.0", [["<2.0.0"]] ]
- , ["<\t2.0.0", [["<2.0.0"]] ]
- , [">=0.1.97", [[">=0.1.97"]] ]
- , [">=0.1.97", [[">=0.1.97"]] ]
- , ["0.1.20 || 1.2.4", [["0.1.20"], ["1.2.4"]] ]
- , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
- , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
- , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
- , ["||", [[""], [""]] ]
- , ["2.x.x", [[">=2.0.0-", "<3.0.0-"]] ]
- , ["1.2.x", [[">=1.2.0-", "<1.3.0-"]] ]
- , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
- , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
- , ["x", [[""]] ]
- , ["2.*.*", [[">=2.0.0-", "<3.0.0-"]] ]
- , ["1.2.*", [[">=1.2.0-", "<1.3.0-"]] ]
- , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
- , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
- , ["*", [[""]] ]
- , ["2", [[">=2.0.0-", "<3.0.0-"]] ]
- , ["2.3", [[">=2.3.0-", "<2.4.0-"]] ]
- , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
- , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
- , ["~>3.2.1", [[">=3.2.1-", "<3.3.0-"]] ]
- , ["~1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["~>1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["~> 1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["~1.0", [[">=1.0.0-", "<1.1.0-"]] ]
- , ["~ 1.0", [[">=1.0.0-", "<1.1.0-"]] ]
- , ["~ 1.0.3", [[">=1.0.3-", "<1.1.0-"]] ]
- , ["~> 1.0.3", [[">=1.0.3-", "<1.1.0-"]] ]
- , ["<1", [["<1.0.0-"]] ]
- , ["< 1", [["<1.0.0-"]] ]
- , [">=1", [[">=1.0.0-"]] ]
- , [">= 1", [[">=1.0.0-"]] ]
- , ["<1.2", [["<1.2.0-"]] ]
- , ["< 1.2", [["<1.2.0-"]] ]
- , ["1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["1 2", [[">=1.0.0-", "<2.0.0-", ">=2.0.0-", "<3.0.0-"]] ]
- ].forEach(function (v) {
- t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1]))
- })
-
- t.end()
-})
--- /dev/null
+var tap = require('tap');
+var test = tap.test;
+
+test('amd', function(t) {
+ global.define = define;
+ define.amd = true;
+ var defined = null;
+ function define(stuff) {
+ defined = stuff;
+ }
+ var fromRequire = require('../');
+ t.ok(defined, 'amd function called');
+ t.equal(fromRequire, defined, 'amd stuff same as require stuff');
+ t.end();
+});
--- /dev/null
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var eq = semver.eq;
+var gt = semver.gt;
+var lt = semver.lt;
+var neq = semver.neq;
+var cmp = semver.cmp;
+var gte = semver.gte;
+var lte = semver.lte;
+var satisfies = semver.satisfies;
+var validRange = semver.validRange;
+var inc = semver.inc;
+var replaceStars = semver.replaceStars;
+var toComparators = semver.toComparators;
+var SemVer = semver.SemVer;
+var Range = semver.Range;
+
+test('\ncomparison tests', function(t) {
+ // [version1, version2]
+ // version1 should be greater than version2
+ [['0.0.0', '0.0.0-foo'],
+ ['0.0.1', '0.0.0'],
+ ['1.0.0', '0.9.9'],
+ ['0.10.0', '0.9.0'],
+ ['0.99.0', '0.10.0'],
+ ['2.0.0', '1.2.3'],
+ ['v0.0.0', '0.0.0-foo', true],
+ ['v0.0.1', '0.0.0', true],
+ ['v1.0.0', '0.9.9', true],
+ ['v0.10.0', '0.9.0', true],
+ ['v0.99.0', '0.10.0', true],
+ ['v2.0.0', '1.2.3', true],
+ ['0.0.0', 'v0.0.0-foo', true],
+ ['0.0.1', 'v0.0.0', true],
+ ['1.0.0', 'v0.9.9', true],
+ ['0.10.0', 'v0.9.0', true],
+ ['0.99.0', 'v0.10.0', true],
+ ['2.0.0', 'v1.2.3', true],
+ ['1.2.3', '1.2.3-asdf'],
+ ['1.2.3', '1.2.3-4'],
+ ['1.2.3', '1.2.3-4-foo'],
+ ['1.2.3-5-foo', '1.2.3-5'],
+ ['1.2.3-5', '1.2.3-4'],
+ ['1.2.3-5-foo', '1.2.3-5-Foo'],
+ ['3.0.0', '2.7.2+asdf'],
+ ['1.2.3-a.10', '1.2.3-a.5'],
+ ['1.2.3-a.b', '1.2.3-a.5'],
+ ['1.2.3-a.b', '1.2.3-a'],
+ ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100']
+ ].forEach(function(v) {
+ var v0 = v[0];
+ var v1 = v[1];
+ var loose = v[2];
+ t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
+ t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
+ t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
+ t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
+ t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
+ t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
+ t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
+ t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
+ t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
+ t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
+ t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
+ });
+ t.end();
+});
+
+test('\nequality tests', function(t) {
+ // [version1, version2]
+ // version1 should be equivalent to version2
+ [['1.2.3', 'v1.2.3', true],
+ ['1.2.3', '=1.2.3', true],
+ ['1.2.3', 'v 1.2.3', true],
+ ['1.2.3', '= 1.2.3', true],
+ ['1.2.3', ' v1.2.3', true],
+ ['1.2.3', ' =1.2.3', true],
+ ['1.2.3', ' v 1.2.3', true],
+ ['1.2.3', ' = 1.2.3', true],
+ ['1.2.3-0', 'v1.2.3-0', true],
+ ['1.2.3-0', '=1.2.3-0', true],
+ ['1.2.3-0', 'v 1.2.3-0', true],
+ ['1.2.3-0', '= 1.2.3-0', true],
+ ['1.2.3-0', ' v1.2.3-0', true],
+ ['1.2.3-0', ' =1.2.3-0', true],
+ ['1.2.3-0', ' v 1.2.3-0', true],
+ ['1.2.3-0', ' = 1.2.3-0', true],
+ ['1.2.3-1', 'v1.2.3-1', true],
+ ['1.2.3-1', '=1.2.3-1', true],
+ ['1.2.3-1', 'v 1.2.3-1', true],
+ ['1.2.3-1', '= 1.2.3-1', true],
+ ['1.2.3-1', ' v1.2.3-1', true],
+ ['1.2.3-1', ' =1.2.3-1', true],
+ ['1.2.3-1', ' v 1.2.3-1', true],
+ ['1.2.3-1', ' = 1.2.3-1', true],
+ ['1.2.3-beta', 'v1.2.3-beta', true],
+ ['1.2.3-beta', '=1.2.3-beta', true],
+ ['1.2.3-beta', 'v 1.2.3-beta', true],
+ ['1.2.3-beta', '= 1.2.3-beta', true],
+ ['1.2.3-beta', ' v1.2.3-beta', true],
+ ['1.2.3-beta', ' =1.2.3-beta', true],
+ ['1.2.3-beta', ' v 1.2.3-beta', true],
+ ['1.2.3-beta', ' = 1.2.3-beta', true],
+ ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
+ ['1.2.3+build', ' = 1.2.3+otherbuild', true],
+ ['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
+ ['1.2.3+build', '1.2.3+otherbuild'],
+ [' v1.2.3+build', '1.2.3+otherbuild']
+ ].forEach(function(v) {
+ var v0 = v[0];
+ var v1 = v[1];
+ var loose = v[2];
+ t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
+ t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
+ t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
+ t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
+ t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
+ t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
+ t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
+ t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
+ t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
+ t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
+ });
+ t.end();
+});
+
+
+test('\nrange tests', function(t) {
+ // [range, version]
+ // version should be included by range
+ [['1.0.0 - 2.0.0', '1.2.3'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '0.2.4'],
+ ['', '1.0.0'],
+ ['*', '1.2.3'],
+ ['*', 'v1.2.3-foo', true],
+ ['>=1.0.0', '1.0.0'],
+ ['>=1.0.0', '1.0.1'],
+ ['>=1.0.0', '1.1.0'],
+ ['>1.0.0', '1.0.1'],
+ ['>1.0.0', '1.1.0'],
+ ['<=2.0.0', '2.0.0'],
+ ['<=2.0.0', '1.9999.9999'],
+ ['<=2.0.0', '0.2.9'],
+ ['<2.0.0', '1.9999.9999'],
+ ['<2.0.0', '0.2.9'],
+ ['>= 1.0.0', '1.0.0'],
+ ['>= 1.0.0', '1.0.1'],
+ ['>= 1.0.0', '1.1.0'],
+ ['> 1.0.0', '1.0.1'],
+ ['> 1.0.0', '1.1.0'],
+ ['<= 2.0.0', '2.0.0'],
+ ['<= 2.0.0', '1.9999.9999'],
+ ['<= 2.0.0', '0.2.9'],
+ ['< 2.0.0', '1.9999.9999'],
+ ['<\t2.0.0', '0.2.9'],
+ ['>=0.1.97', 'v0.1.97', true],
+ ['>=0.1.97', '0.1.97'],
+ ['0.1.20 || 1.2.4', '1.2.4'],
+ ['>=0.2.3 || <0.0.1', '0.0.0'],
+ ['>=0.2.3 || <0.0.1', '0.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.4'],
+ ['||', '1.3.4'],
+ ['2.x.x', '2.1.3'],
+ ['1.2.x', '1.2.3'],
+ ['1.2.x || 2.x', '2.1.3'],
+ ['1.2.x || 2.x', '1.2.3'],
+ ['x', '1.2.3'],
+ ['2.*.*', '2.1.3'],
+ ['1.2.*', '1.2.3'],
+ ['1.2.* || 2.*', '2.1.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['*', '1.2.3'],
+ ['2', '2.1.2'],
+ ['2.3', '2.3.1'],
+ ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.4.5'],
+ ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
+ ['~1', '1.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '1.2.3'],
+ ['~> 1', '1.2.3'],
+ ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
+ ['~ 1.0', '1.0.2'],
+ ['~ 1.0.3', '1.0.12'],
+ ['>=1', '1.0.0'],
+ ['>= 1', '1.0.0'],
+ ['<1.2', '1.1.1'],
+ ['< 1.2', '1.1.1'],
+ ['1', '1.0.0beta', true],
+ ['~v0.5.4-pre', '0.5.5'],
+ ['~v0.5.4-pre', '0.5.4'],
+ ['=0.7.x', '0.7.2'],
+ ['>=0.7.x', '0.7.2'],
+ ['=0.7.x', '0.7.0-asdf'],
+ ['>=0.7.x', '0.7.0-asdf'],
+ ['<=0.7.x', '0.6.2'],
+ ['~1.2.1 >=1.2.3', '1.2.3'],
+ ['~1.2.1 =1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3', '1.2.3'],
+ ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3', '1.2.3'],
+ ['>=1.2.1 1.2.3', '1.2.3'],
+ ['1.2.3 >=1.2.1', '1.2.3'],
+ ['>=1.2.3 >=1.2.1', '1.2.3'],
+ ['>=1.2.1 >=1.2.3', '1.2.3'],
+ ['<=1.2.3', '1.2.3-beta'],
+ ['>1.2', '1.3.0-beta'],
+ ['>=1.2', '1.2.8']
+ ].forEach(function(v) {
+ var range = v[0];
+ var ver = v[1];
+ var loose = v[2];
+ t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
+ });
+ t.end();
+});
+
+test('\nnegative range tests', function(t) {
+ // [range, version]
+ // version should not be included by range
+ [['1.0.0 - 2.0.0', '2.2.3'],
+ ['1.0.0', '1.0.1'],
+ ['>=1.0.0', '0.0.0'],
+ ['>=1.0.0', '0.0.1'],
+ ['>=1.0.0', '0.1.0'],
+ ['>1.0.0', '0.0.1'],
+ ['>1.0.0', '0.1.0'],
+ ['<=2.0.0', '3.0.0'],
+ ['<=2.0.0', '2.9999.9999'],
+ ['<=2.0.0', '2.2.9'],
+ ['<2.0.0', '2.9999.9999'],
+ ['<2.0.0', '2.2.9'],
+ ['>=0.1.97', 'v0.1.93', true],
+ ['>=0.1.97', '0.1.93'],
+ ['0.1.20 || 1.2.4', '1.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.0.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.2'],
+ ['2.x.x', '1.1.3'],
+ ['2.x.x', '3.1.3'],
+ ['1.2.x', '1.3.3'],
+ ['1.2.x || 2.x', '3.1.3'],
+ ['1.2.x || 2.x', '1.1.3'],
+ ['2.*.*', '1.1.3'],
+ ['2.*.*', '3.1.3'],
+ ['1.2.*', '1.3.3'],
+ ['1.2.* || 2.*', '3.1.3'],
+ ['1.2.* || 2.*', '1.1.3'],
+ ['2', '1.1.2'],
+ ['2.3', '2.4.1'],
+ ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.3.9'],
+ ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
+ ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
+ ['~1', '0.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '2.2.3'],
+ ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
+ ['<1', '1.0.0'],
+ ['>=1.2', '1.1.1'],
+ ['1', '2.0.0beta', true],
+ ['~v0.5.4-beta', '0.5.4-alpha'],
+ ['<1', '1.0.0beta', true],
+ ['< 1', '1.0.0beta', true],
+ ['=0.7.x', '0.8.2'],
+ ['>=0.7.x', '0.6.2'],
+ ['<=0.7.x', '0.7.2'],
+ ['<1.2.3', '1.2.3-beta'],
+ ['=1.2.3', '1.2.3-beta'],
+ ['>1.2', '1.2.8'],
+ // invalid ranges never satisfied!
+ ['blerg', '1.2.3']
+ ].forEach(function(v) {
+ var range = v[0];
+ var ver = v[1];
+ var loose = v[2];
+ var found = satisfies(ver, range, loose);
+ t.ok(!found, ver + ' not satisfied by ' + range);
+ });
+ t.end();
+});
+
+test('\nincrement versions test', function(t) {
+ // [version, inc, result]
+ // inc(version, inc) -> result
+ [['1.2.3', 'major', '2.0.0'],
+ ['1.2.3', 'minor', '1.3.0'],
+ ['1.2.3', 'patch', '1.2.4'],
+ ['1.2.3tag', 'major', '2.0.0', true],
+ ['1.2.3-tag', 'major', '2.0.0'],
+ ['1.2.3', 'fake', null],
+ ['fake', 'major', null],
+ ['1.2.3', 'prerelease', '1.2.3-0'],
+ ['1.2.3-0', 'prerelease', '1.2.3-1'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
+ ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
+ ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
+ ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
+ ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
+ ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
+ ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
+ ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
+ ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
+ ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
+ ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta']
+ ].forEach(function(v) {
+ var pre = v[0];
+ var what = v[1];
+ var wanted = v[2];
+ var loose = v[3];
+ var found = inc(pre, what, loose);
+ t.equal(found, wanted, 'inc(' + pre + ', ' + what + ') === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\nvalid range test', function(t) {
+ // [range, result]
+ // validRange(range) -> result
+ // translate ranges into their canonical form
+ [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '>=0.0.0-0'],
+ ['', '*'],
+ ['*', '*'],
+ ['*', '*'],
+ ['>=1.0.0', '>=1.0.0'],
+ ['>1.0.0', '>1.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['1', '>=1.0.0-0 <2.0.0-0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['<2.0.0', '<2.0.0-0'],
+ ['<2.0.0', '<2.0.0-0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['> 1.0.0', '>1.0.0'],
+ ['> 1.0.0', '>1.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['< 2.0.0', '<2.0.0-0'],
+ ['< 2.0.0', '<2.0.0-0'],
+ ['>=0.1.97', '>=0.1.97'],
+ ['>=0.1.97', '>=0.1.97'],
+ ['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1-0'],
+ ['||', '||'],
+ ['2.x.x', '>=2.0.0-0 <3.0.0-0'],
+ ['1.2.x', '>=1.2.0-0 <1.3.0-0'],
+ ['1.2.x || 2.x', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'],
+ ['1.2.x || 2.x', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'],
+ ['x', '*'],
+ ['2.*.*', '>=2.0.0-0 <3.0.0-0'],
+ ['1.2.*', '>=1.2.0-0 <1.3.0-0'],
+ ['1.2.* || 2.*', '>=1.2.0-0 <1.3.0-0||>=2.0.0-0 <3.0.0-0'],
+ ['*', '*'],
+ ['2', '>=2.0.0-0 <3.0.0-0'],
+ ['2.3', '>=2.3.0-0 <2.4.0-0'],
+ ['~2.4', '>=2.4.0-0 <2.5.0-0'],
+ ['~2.4', '>=2.4.0-0 <2.5.0-0'],
+ ['~>3.2.1', '>=3.2.1-0 <3.3.0-0'],
+ ['~1', '>=1.0.0-0 <2.0.0-0'],
+ ['~>1', '>=1.0.0-0 <2.0.0-0'],
+ ['~> 1', '>=1.0.0-0 <2.0.0-0'],
+ ['~1.0', '>=1.0.0-0 <1.1.0-0'],
+ ['~ 1.0', '>=1.0.0-0 <1.1.0-0'],
+ ['<1', '<1.0.0-0'],
+ ['< 1', '<1.0.0-0'],
+ ['>=1', '>=1.0.0-0'],
+ ['>= 1', '>=1.0.0-0'],
+ ['<1.2', '<1.2.0-0'],
+ ['< 1.2', '<1.2.0-0'],
+ ['1', '>=1.0.0-0 <2.0.0-0'],
+ ['>01.02.03', '>1.2.3', true],
+ ['>01.02.03', null],
+ ['~1.2.3beta', '>=1.2.3-beta <1.3.0-0', true],
+ ['~1.2.3beta', null]
+ ].forEach(function(v) {
+ var pre = v[0];
+ var wanted = v[1];
+ var loose = v[2];
+ var found = validRange(pre, loose);
+
+ t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\ncomparators test', function(t) {
+ // [range, comparators]
+ // turn range into a set of individual comparators
+ [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
+ ['1.0.0', [['1.0.0']]],
+ ['>=*', [['>=0.0.0-0']]],
+ ['', [['']]],
+ ['*', [['']]],
+ ['*', [['']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>1.0.0', [['>1.0.0']]],
+ ['>1.0.0', [['>1.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['<2.0.0', [['<2.0.0-0']]],
+ ['<2.0.0', [['<2.0.0-0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['> 1.0.0', [['>1.0.0']]],
+ ['> 1.0.0', [['>1.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['< 2.0.0', [['<2.0.0-0']]],
+ ['<\t2.0.0', [['<2.0.0-0']]],
+ ['>=0.1.97', [['>=0.1.97']]],
+ ['>=0.1.97', [['>=0.1.97']]],
+ ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1-0']]],
+ ['||', [[''], ['']]],
+ ['2.x.x', [['>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2.x', [['>=1.2.0-0', '<1.3.0-0']]],
+ ['1.2.x || 2.x', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2.x || 2.x', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]],
+ ['x', [['']]],
+ ['2.*.*', [['>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2.*', [['>=1.2.0-0', '<1.3.0-0']]],
+ ['1.2.* || 2.*', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2.* || 2.*', [['>=1.2.0-0', '<1.3.0-0'], ['>=2.0.0-0', '<3.0.0-0']]],
+ ['*', [['']]],
+ ['2', [['>=2.0.0-0', '<3.0.0-0']]],
+ ['2.3', [['>=2.3.0-0', '<2.4.0-0']]],
+ ['~2.4', [['>=2.4.0-0', '<2.5.0-0']]],
+ ['~2.4', [['>=2.4.0-0', '<2.5.0-0']]],
+ ['~>3.2.1', [['>=3.2.1-0', '<3.3.0-0']]],
+ ['~1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['~>1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['~> 1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['~1.0', [['>=1.0.0-0', '<1.1.0-0']]],
+ ['~ 1.0', [['>=1.0.0-0', '<1.1.0-0']]],
+ ['~ 1.0.3', [['>=1.0.3-0', '<1.1.0-0']]],
+ ['~> 1.0.3', [['>=1.0.3-0', '<1.1.0-0']]],
+ ['<1', [['<1.0.0-0']]],
+ ['< 1', [['<1.0.0-0']]],
+ ['>=1', [['>=1.0.0-0']]],
+ ['>= 1', [['>=1.0.0-0']]],
+ ['<1.2', [['<1.2.0-0']]],
+ ['< 1.2', [['<1.2.0-0']]],
+ ['1', [['>=1.0.0-0', '<2.0.0-0']]],
+ ['1 2', [['>=1.0.0-0', '<2.0.0-0', '>=2.0.0-0', '<3.0.0-0']]],
+ ['1.2 - 3.4.5', [['>=1.2.0-0', '<=3.4.5']]],
+ ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0-0']]]
+ ].forEach(function(v) {
+ var pre = v[0];
+ var wanted = v[1];
+ var found = toComparators(v[0]);
+ var jw = JSON.stringify(wanted);
+ t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
+ });
+
+ t.end();
+});
+
+test('\nstrict vs loose version numbers', function(t) {
+ [['=1.2.3', '1.2.3'],
+ ['01.02.03', '1.2.3'],
+ ['1.2.3-beta.01', '1.2.3-beta.1'],
+ [' =1.2.3', '1.2.3'],
+ ['1.2.3foo', '1.2.3-foo']
+ ].forEach(function(v) {
+ var loose = v[0];
+ var strict = v[1];
+ t.throws(function() {
+ new SemVer(loose);
+ });
+ var lv = new SemVer(loose, true);
+ t.equal(lv.version, strict);
+ t.ok(eq(loose, strict, true));
+ t.throws(function() {
+ eq(loose, strict);
+ });
+ t.throws(function() {
+ new SemVer(strict).compare(loose);
+ });
+ });
+ t.end();
+});
+
+test('\nstrict vs loose ranges', function(t) {
+ [['>=01.02.03', '>=1.2.3'],
+ ['~1.02.03beta', '>=1.2.3-beta <1.3.0-0']
+ ].forEach(function(v) {
+ var loose = v[0];
+ var comps = v[1];
+ t.throws(function() {
+ new Range(loose);
+ });
+ t.equal(new Range(loose, true).range, comps);
+ });
+ t.end();
+});
+
+test('\nmax satisfying', function(t) {
+ [[['1.2.3', '1.2.4'], '1.2', '1.2.4'],
+ [['1.2.4', '1.2.3'], '1.2', '1.2.4'],
+ [['1.2.3','1.2.4','1.2.5','1.2.6'], '~1.2.3', '1.2.6']
+ ].forEach(function(v) {
+ var versions = v[0];
+ var range = v[1];
+ var expect = v[2];
+ var loose = v[3];
+ var actual = semver.maxSatisfying(versions, range, loose);
+ t.equal(actual, expect);
+ });
+ t.end();
+});
--- /dev/null
+var tap = require('tap');
+var test = tap.test;
+
+test('no module system', function(t) {
+ var fs = require('fs');
+ var vm = require('vm');
+ var head = fs.readFileSync(require.resolve('../head.js'), 'utf8');
+ var src = fs.readFileSync(require.resolve('../'), 'utf8');
+ var foot = fs.readFileSync(require.resolve('../foot.js'), 'utf8');
+ vm.runInThisContext(head + src + foot, 'semver.js');
+
+ // just some basic poking to see if it did some stuff
+ t.type(global.semver, 'object');
+ t.type(global.semver.SemVer, 'function');
+ t.type(global.semver.Range, 'function');
+ t.ok(global.semver.satisfies('1.2.3', '1.2'));
+ t.end();
+});
+
{
- "version": "1.2.32",
+ "version": "1.3.2",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
"main": "./lib/npm.js",
"bin": "./bin/npm-cli.js",
"dependencies": {
- "semver": "~1.1.2",
+ "semver": "~2.0.8",
"ini": "~1.1.0",
"slide": "~1.1.4",
"abbrev": "~1.0.4",
"graceful-fs": "~1.2.2",
"minimatch": "~0.2.12",
"nopt": "~2.1.1",
- "rimraf": "2",
+ "rimraf": "~2.2.0",
"request": "~2.21.0",
"which": "1",
"tar": "~0.1.17",
"mkdirp": "~0.3.3",
"read": "~1.0.4",
"lru-cache": "~2.3.0",
- "node-gyp": "~0.10.0",
+ "node-gyp": "~0.10.2",
"fstream-npm": "~0.1.3",
"uid-number": "0",
"archy": "0",
"chownr": "0",
- "npmlog": "0",
+ "npmlog": "0.0.3",
"ansi": "~0.1.2",
- "npm-registry-client": "~0.2.22",
- "read-package-json": "~0.4.1",
- "read-installed": "0",
+ "npm-registry-client": "~0.2.26",
+ "read-package-json": "~1.1.0",
+ "read-installed": "~0.2.2",
"glob": "~3.2.1",
- "init-package-json": "0.0.9",
+ "init-package-json": "0.0.10",
"osenv": "0",
"lockfile": "~0.3.2",
"retry": "~0.6.0",
"once": "~1.1.1",
- "npmconf": "~0.1.0",
+ "npmconf": "~0.1.1",
"opener": "~1.3.0",
"chmodr": "~0.1.0",
"cmd-shim": "~1.1.0",
"sha": "~1.0.1",
"editor": "0.0.4",
"child-process-close": "~0.1.1",
- "npm-user-validate": "0.0.3",
- "normalize-package-data": "~0.1.7"
+ "npm-user-validate": "0.0.3"
},
"bundleDependencies": [
"semver",
-#!/bin/bash
+#!/usr/bin/env bash
if [[ $DEBUG != "" ]]; then
set -x
--- /dev/null
+{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}}
\ No newline at end of file
--- /dev/null
+{"_id":"underscore","_rev":"119-a5be0bcbbb6f45bd345730eca56c65e9","name":"underscore","description":"JavaScript's functional programming helper library.","dist-tags":{"latest":"1.4.4","stable":"1.4.4"},"versions":{"1.0.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.3","_id":"underscore@1.0.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.3.tgz","shasum":"7793a6f776dffa491d224eaf1d819824d4dc288a"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.0.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.4","_id":"underscore@1.0.4","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.4.tgz","shasum":"563141126b4e412f6c12c2ae2fb44ef0edd23fb2"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.0":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.0","_id":"underscore@1.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.0.tgz","shasum":"8bf44d9cc8c3a614d7940035522e1f95b682b071"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.1":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.1","_id":"underscore@1.1.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.1.tgz","shasum":"65dddb8cd0ee3f0094f46db72ea269d5a4f5fca4"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.2":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.2","_id":"underscore@1.1.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.2.tgz","shasum":"8cf4ae3900c32f3e3f06579d473a45ad768251e8"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.3","_id":"underscore@1.1.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.8-1","_nodeVersion":"v0.2.5","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.3.tgz","shasum":"6bd1969042a65bd3966d8924c14909f2284631dd"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore.js","version":"1.1.4","_id":"underscore@1.1.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.9","_nodeVersion":"v0.5.0-pre","dist":{"shasum":"9e82274902865625b3a6d4c315a38ffd80047dae","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.4.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.1.5":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.5","_id":"underscore@1.1.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.16","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"23601d62c75619998b2f0db24938102793336a56","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.5.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.6":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.6","_id":"underscore@1.1.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"6868da1bdd72d75285be0b4e50f228e70d001a2c","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.6.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.7":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.7","devDependencies":{},"_id":"underscore@1.1.7","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"40bab84bad19d230096e8d6ef628bff055d83db0","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz"},"scripts":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.0","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.0","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"b32ce32c8c118caa8031c10b54c7f65ab3b557fd","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.0.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.1","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.1","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"fc5c6b0765673d92a2d4ac8b4dc0aa88702e2bd4","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.1.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.2","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"74dd40e9face84e724eb2edae945b8aedc233ba3","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.2.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.3","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"11b874da70f4683d7d48bba2b44be1e600d2f6cf","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.3.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.4":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.4","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"e8da6241aa06f64df2473bb2590b8c17c84c3c7e","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.4.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.0","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"253b2d79b7bb67943ced0fc744eb18267963ede8","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.0.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.1","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"6cb8aad0e77eb5dbbfb54b22bcd8697309cf9641","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.1.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"1b4e455089ab1d1d38ab6794ffe6cf08f764394a","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.2.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.0","readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.0","dist":{"shasum":"caaf510c272cbb53748a225dcfd906e5f5a5ccdd","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.0.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.1","readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.1","dist":{"shasum":"f6a25ffe5d6d3ed4fe8fef37c3a9bfe689b16bb9","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.1.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.2","readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.2","dist":{"shasum":"cb2aae6a7999a89fd55aaee75bce0311698cebfb","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.2.tgz"},"_npmVersion":"1.1.49","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.3","readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.3","dist":{"shasum":"b3d0aaa1ee74d886ea4f2648021a4f8ad779ed1d","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.3.tgz"},"_npmVersion":"1.1.63","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.4.4":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://underscorejs.org","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.4.4","devDependencies":{"phantomjs":"0.2.2"},"scripts":{"test":"phantomjs test/vendor/runner.js test/index.html?noglobals=true"},"readme":" __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","_id":"underscore@1.4.4","dist":{"shasum":"61a6a32010622afa07963bf325203cf12239d604","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz"},"_npmVersion":"1.1.63","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}}},"maintainers":[{"name":"jashkenas","email":"jashkenas@gmail.com"}],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"time":{"1.0.3":"2011-12-07T15:12:18.045Z","1.0.4":"2011-12-07T15:12:18.045Z","1.1.0":"2011-12-07T15:12:18.045Z","1.1.1":"2011-12-07T15:12:18.045Z","1.1.2":"2011-12-07T15:12:18.045Z","1.1.3":"2011-12-07T15:12:18.045Z","1.1.4":"2011-12-07T15:12:18.045Z","1.1.5":"2011-12-07T15:12:18.045Z","1.1.6":"2011-12-07T15:12:18.045Z","1.1.7":"2011-12-07T15:12:18.045Z","1.2.0":"2011-12-07T15:12:18.045Z","1.2.1":"2011-12-07T15:12:18.045Z","1.2.2":"2011-11-14T20:28:47.115Z","1.2.3":"2011-12-07T15:12:18.045Z","1.2.4":"2012-01-09T17:23:14.818Z","1.3.0":"2012-01-11T16:41:38.459Z","1.3.1":"2012-01-23T22:57:36.474Z","1.3.2":"2012-04-09T18:38:14.345Z","1.3.3":"2012-04-10T14:43:48.089Z","1.4.0":"2012-09-27T22:02:55.267Z","1.4.1":"2012-10-01T17:20:22.595Z","1.4.2":"2012-10-07T03:05:02.986Z","1.4.3":"2012-12-04T18:47:36.401Z","1.4.4":"2013-01-30T02:12:42.969Z"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"users":{"vesln":true,"mvolkmann":true,"lancehunt":true,"mikl":true,"linus":true,"vasc":true,"bat":true,"dmalam":true,"mbrevoort":true,"danielr":true,"rsimoes":true,"thlorenz":true,"jharding":true,"tellnes":true,"fgribreau":true,"pid":true,"tylerstalder":true,"graemef":true,"gillesruppert":true,"travishorn":true,"m42am":true,"af":true,"bencevans":true,"Scryptonite":true,"konklone":true,"esp":true,"bryanburgers":true,"ehershey":true,"freethenation":true,"dannydulai":true,"megadrive":true,"lupomontero":true,"cj.nichols":true,"dbrockman":true,"maxmaximov":true,"hyqhyq_3":true,"zonetti":true,"cparker15":true,"lemulot":true,"mlowe":true,"chilts":true},"_attachments":{"underscore-1.4.4.tgz":{"content_type":"application/octet-stream","revpos":104,"digest":"md5-s/MrjCiRarwh7tZ9DX+RyA==","length":41763,"stub":true},"underscore-1.4.3.tgz":{"content_type":"application/octet-stream","revpos":97,"digest":"md5-SbGx702k/T8yuag+j/VjCg==","length":62294,"stub":true},"underscore-1.4.2.tgz":{"content_type":"application/octet-stream","revpos":91,"digest":"md5-vSAO6RpJID3UCJkAWMEIjg==","length":61836,"stub":true},"underscore-1.4.1.tgz":{"content_type":"application/octet-stream","revpos":88,"digest":"md5-O72hIvWp7cVwkiA/2eF6rg==","length":61692,"stub":true},"underscore-1.4.0.tgz":{"content_type":"application/octet-stream","revpos":85,"digest":"md5-26PeH3uwZlxMzfzwS4LmMg==","length":61579,"stub":true},"underscore-1.3.3.tgz":{"content_type":"application/octet-stream","revpos":69,"digest":"md5-lRWlaQvCPiUt9CVTCTbZqQ==","length":58692,"stub":true},"underscore-1.3.2.tgz":{"content_type":"application/octet-stream","revpos":66,"digest":"md5-yS3kcu5U31CO0KAJcBJ9yA==","length":58699,"stub":true},"underscore-1.3.1.tgz":{"content_type":"application/octet-stream","revpos":60,"digest":"md5-Y4Z1Vvv7gZoZtJ9mTz0zSQ==","length":61440,"stub":true},"underscore-1.3.0.tgz":{"content_type":"application/octet-stream","revpos":56,"digest":"md5-eIPIVGdK7Fzup3CU/AMO4g==","length":61440,"stub":true},"underscore-1.2.4.tgz":{"content_type":"application/octet-stream","revpos":54,"digest":"md5-jCUzsaWc+tlE/lQNsuLQBA==","length":61440,"stub":true},"underscore-1.2.3.tgz":{"content_type":"application/octet-stream","revpos":41,"digest":"md5-bP9hXPsRRpFAWlmUNIY+jA==","length":40960,"stub":true},"underscore-1.2.2.tgz":{"content_type":"application/octet-stream","revpos":38,"digest":"md5-78/kFlhnF2WL94pdo/dfww==","length":40960,"stub":true},"underscore-1.2.1.tgz":{"content_type":"application/octet-stream","revpos":35,"digest":"md5-gNzWgJppZn3xUj8LCQcJ+Q==","length":31879,"stub":true},"underscore-1.2.0.tgz":{"content_type":"application/octet-stream","revpos":33,"digest":"md5-WYSTx/McoA2yFB6GmQ5KnA==","length":31310,"stub":true},"underscore-1.1.7.tgz":{"content_type":"application/octet-stream","revpos":29,"digest":"md5-BxaNPc3JexY2qLOK3gDhgw==","length":29052,"stub":true},"underscore-1.1.6.tgz":{"content_type":"application/octet-stream","revpos":27,"digest":"md5-U11VsMTDu6BEZDKJlZidTw==","length":25592,"stub":true},"underscore-1.1.5.tgz":{"content_type":"application/octet-stream","revpos":25,"digest":"md5-rpLusI4XejA3uVROFAZg1A==","length":25038,"stub":true},"underscore-1.1.4.tgz":{"content_type":"application/octet-stream","revpos":23,"digest":"md5-VrXC+bUYmxwzr2CQH4oq0w==","length":86233,"stub":true},"underscore-1.1.3.tgz":{"content_type":"application/octet-stream","revpos":17,"digest":"md5-sdTV7zbtYfhAAanQLEcziw==","length":86107,"stub":true},"underscore-1.1.2.tgz":{"content_type":"application/octet-stream","revpos":11,"digest":"md5-SSm/3w/usRqR+0SrSyCr8A==","length":85482,"stub":true},"underscore-1.1.1.tgz":{"content_type":"application/octet-stream","revpos":9,"digest":"md5-UW8pTfPbkrRFTiwM6AFlVA==","length":85214,"stub":true},"underscore-1.1.0.tgz":{"content_type":"application/octet-stream","revpos":7,"digest":"md5-YJcA44Oj1Dm2imfD7dHLag==","length":71266,"stub":true},"underscore-1.0.4.tgz":{"content_type":"application/octet-stream","revpos":5,"digest":"md5-nRJu+q0L17u8DZqPxVvQKQ==","length":71018,"stub":true},"underscore-1.0.3.tgz":{"content_type":"application/octet-stream","revpos":3,"digest":"md5-pwgll4db7l4cg7fPTrgVTw==","length":70285,"stub":true}}}
\ No newline at end of file
--- /dev/null
+var test = require("tap").test
+var npm = require.resolve("../../bin/npm-cli.js")
+var osenv = require("osenv")
+var path = require("path")
+var http = require("http")
+var fs = require("fs")
+var rimraf = require("rimraf")
+var mkdirp = require('mkdirp')
+
+var server, child
+var spawn = require("child_process").spawn
+var node = process.execPath
+
+var pkg = process.env.npm_config_tmp || '/tmp'
+pkg += path.sep + 'noargs-install-config-save'
+
+function writePackageJson() {
+ rimraf.sync(pkg)
+ mkdirp.sync(pkg)
+
+ fs.writeFileSync(pkg + '/package.json', JSON.stringify({
+ "author": "Rocko Artischocko",
+ "name": "noargs",
+ "version": "0.0.0",
+ "devDependencies": {
+ "underscore": "1.3.0"
+ }
+ }), 'utf8')
+}
+
+function createChild (args) {
+ var env = {
+ npm_config_save: true,
+ npm_config_registry: "http://localhost:1337",
+ HOME: process.env.HOME,
+ Path: process.env.PATH,
+ PATH: process.env.PATH
+ }
+
+ if (process.platform === "win32")
+ env.npm_config_cache = "%APPDATA%\\npm-cache"
+
+ return spawn(node, args, {
+ cwd: pkg,
+ stdio: "inherit",
+ env: env
+ })
+}
+
+test("does not update the package.json with empty arguments", function (t) {
+ writePackageJson()
+ t.plan(1)
+ server = http.createServer(function (req, res) {
+ res.setHeader("content-type", "application/javascript")
+ res.statusCode = 200
+ res.end(JSON.stringify(require("./fixtures/underscore-1-3-3.json")))
+ child.on("close", function (m) {
+ var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8"))
+ t.ok(text.indexOf('"dependencies') === -1)
+ t.end()
+ })
+ this.close()
+ })
+ server.listen(1337, function() {
+ child = createChild([npm, "install"])
+ })
+})
+
+test("updates the package.json (adds dependencies) with an argument", function (t) {
+ writePackageJson()
+ t.plan(1)
+ server = http.createServer(function (req, res) {
+ res.setHeader("content-type", "application/javascript")
+ res.statusCode = 200
+ res.end(JSON.stringify(require("./fixtures/underscore.json")))
+ child.on("close", function (m) {
+ var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8"))
+ t.ok(text.indexOf('"dependencies') !== -1)
+ t.end()
+ })
+ this.close()
+ })
+ server.listen(1337, function () {
+ child = createChild([npm, "install", "underscore"])
+ })
+})