Rename "run" folders/files "cli" for consistency

pull/1/head
cgewecke 8 years ago
parent 4b627f6b9e
commit 8223aec065
  1. 2
      .eslintignore
  2. 0
      test/cli/block-gas-limit.js
  3. 0
      test/cli/command-options.js
  4. 0
      test/cli/empty.js
  5. 0
      test/cli/inheritance.js
  6. 0
      test/cli/only-call.js
  7. 0
      test/cli/simple.js
  8. 0
      test/cli/sol-parse-fail.js
  9. 0
      test/cli/testrpc-options.js
  10. 0
      test/cli/truffle-crash.js
  11. 0
      test/cli/truffle-test-fail.js
  12. 0
      test/sources/cli/Empty.sol
  13. 0
      test/sources/cli/Expensive.sol
  14. 0
      test/sources/cli/Migrations.sol
  15. 0
      test/sources/cli/OnlyCall.sol
  16. 0
      test/sources/cli/Owned.sol
  17. 0
      test/sources/cli/Proxy.sol
  18. 0
      test/sources/cli/Simple.sol
  19. 0
      test/sources/cli/SimpleError.sol
  20. 26
      test/util/mockTruffle.js

@ -1 +1 @@
test/run/truffle-crash.js
test/cli/truffle-crash.js

@ -9,8 +9,8 @@ const shell = require('shelljs');
/**
* Installs mock truffle project at ./mock with a single contract
* and test specified by the params.
* @param {String} contract <contractName.sol> located in /test/sources/run/
* @param {[type]} test <testName.js> located in /test/run/
* @param {String} contract <contractName.sol> located in /test/sources/cli/
* @param {[type]} test <testName.js> located in /test/cli/
*/
module.exports.install = function install(contract, test, config) {
shell.mkdir('./mock');
@ -21,13 +21,13 @@ module.exports.install = function install(contract, test, config) {
// Mock contracts
if (Array.isArray(contract)) {
contract.forEach(item => {
shell.cp(`./test/sources/run/${item}`, `./mock/contracts/${item}`);
shell.cp(`./test/sources/cli/${item}`, `./mock/contracts/${item}`);
});
} else {
shell.cp(`./test/sources/run/${contract}`, `./mock/contracts/${contract}`);
shell.cp(`./test/sources/cli/${contract}`, `./mock/contracts/${contract}`);
}
shell.cp('./test/sources/run/Migrations.sol', './mock/contracts/Migrations.sol');
shell.cp('./test/sources/cli/Migrations.sol', './mock/contracts/Migrations.sol');
// Mock migrations
const initialMigration = `
@ -47,7 +47,7 @@ module.exports.install = function install(contract, test, config) {
fs.writeFileSync('./mock/migrations/2_deploy_contracts.js', deployContracts);
// Mock test
shell.cp(`./test/run/${test}`, `./mock/test/${test}`);
shell.cp(`./test/cli/${test}`, `./mock/test/${test}`);
// Mock truffle.js
const trufflejs = `module.exports = {
@ -68,8 +68,8 @@ module.exports.install = function install(contract, test, config) {
/**
* Installs mock truffle project at ./mock with a single contract
* and test specified by the params.
* @param {String} contract <contractName.sol> located in /test/sources/run/
* @param {[type]} test <testName.js> located in /test/run/
* @param {String} contract <contractName.sol> located in /test/sources/cli/
* @param {[type]} test <testName.js> located in /test/cli/
*/
module.exports.installInheritanceTest = function installInheritanceTest(config) {
shell.mkdir('./mock');
@ -78,9 +78,9 @@ module.exports.installInheritanceTest = function installInheritanceTest(config)
shell.mkdir('./mock/test');
// Mock contracts
shell.cp('./test/sources/run/Proxy.sol', './mock/contracts/Proxy.sol');
shell.cp('./test/sources/run/Owned.sol', './mock/contracts/Owned.sol');
shell.cp('./test/sources/run/Migrations.sol', './mock/contracts/Migrations.sol');
shell.cp('./test/sources/cli/Proxy.sol', './mock/contracts/Proxy.sol');
shell.cp('./test/sources/cli/Owned.sol', './mock/contracts/Owned.sol');
shell.cp('./test/sources/cli/Migrations.sol', './mock/contracts/Migrations.sol');
// Mock migrations
const initialMigration = `
@ -102,7 +102,7 @@ module.exports.installInheritanceTest = function installInheritanceTest(config)
fs.writeFileSync('./mock/migrations/2_deploy_contracts.js', deployContracts);
// Mock test
shell.cp('./test/run/inheritance.js', './mock/test/inheritance.js');
shell.cp('./test/cli/inheritance.js', './mock/test/inheritance.js');
// Mock truffle.js
const trufflejs = `module.exports = {
@ -121,7 +121,7 @@ module.exports.installInheritanceTest = function installInheritanceTest(config)
};
/**
* Removes mock truffle project and coverage reports generated by runCovered tests
* Removes mock truffle project and coverage reports generated by exec.js
*/
module.exports.remove = function remove() {
shell.config.silent = true;

Loading…
Cancel
Save