Skip to content

Commit

Permalink
Strip whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
moll committed Jul 8, 2015
1 parent 07a5e9f commit ecaa7a5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -34,7 +34,7 @@ list-core-modules: node.tar.gz
egrep "^node[^/]*/lib/.+" |\
xargs -n1 basename -s .js |\
{ cat; echo node; } | sort

.PHONY: love
.PHONY: spec autospec
.PHONY: pack publish tag
22 changes: 11 additions & 11 deletions test/autoload_test.rb
Expand Up @@ -72,18 +72,18 @@
end

it "must open ./other.js relative to file" do
touch File.join(@dir, "foo", "index.js"), %(require("./other"))
touch File.join(@dir, "foo", "index.js"), %(require("./other"))
touch File.join(@dir, "foo", "other.js")

$vim.edit File.join(@dir, "foo", "index.js")
$vim.feedkeys "f.gf"

bufname = File.realpath($vim.echo(%(bufname("%"))))
bufname.must_equal File.join(@dir, "foo", "other.js")
end

it "must edit ./index.js given ." do
touch File.join(@dir, "other.js"), %(require("."))
touch File.join(@dir, "other.js"), %(require("."))
touch File.join(@dir, "index.js")

$vim.edit File.join(@dir, "other.js")
Expand All @@ -94,7 +94,7 @@
end

it "must edit ./index.js given ./" do
touch File.join(@dir, "other.js"), %(require("./"))
touch File.join(@dir, "other.js"), %(require("./"))
touch File.join(@dir, "index.js")

$vim.edit File.join(@dir, "other.js")
Expand All @@ -105,7 +105,7 @@
end

it "must edit ../index.js given .." do
touch File.join(@dir, "foo", "other.js"), %(require(".."))
touch File.join(@dir, "foo", "other.js"), %(require(".."))
touch File.join(@dir, "index.js")

$vim.edit File.join(@dir, "foo", "other.js")
Expand All @@ -116,7 +116,7 @@
end

it "must edit ../index.js given ../" do
touch File.join(@dir, "foo", "other.js"), %(require("../"))
touch File.join(@dir, "foo", "other.js"), %(require("../"))
touch File.join(@dir, "index.js")

$vim.edit File.join(@dir, "foo", "other.js")
Expand All @@ -127,10 +127,10 @@
end

it "must open ./node_modules/foo/index.js given foo" do
touch File.join(@dir, "index.js"), %(require("foo"))
touch File.join(@dir, "index.js"), %(require("foo"))
index = File.join(@dir, "node_modules", "foo", "index.js")
touch index

$vim.edit File.join(@dir, "index.js")
$vim.feedkeys "$hhgf"
$vim.echo(%(bufname("%"))).must_equal index
Expand Down Expand Up @@ -176,7 +176,7 @@

describe "Goto file with split" do
it "must edit file in a new split" do
touch File.join(@dir, "index.js"), %(require("./other"))
touch File.join(@dir, "index.js"), %(require("./other"))
touch File.join(@dir, "other.js")

$vim.edit File.join(@dir, "index.js")
Expand All @@ -190,7 +190,7 @@

describe "Goto file with tab" do
it "must edit file in a new tab" do
touch File.join(@dir, "index.js"), %(require("./other"))
touch File.join(@dir, "index.js"), %(require("./other"))
touch File.join(@dir, "other.js")

$vim.edit File.join(@dir, "index.js")
Expand Down
4 changes: 2 additions & 2 deletions test/helper.rb
Expand Up @@ -24,11 +24,11 @@ def setup
super
# Mac has the temporary directory symlinked, so need File.realpath to
# match the paths that Vim returns.
@dir = File.realpath(Dir.mktmpdir)
@dir = File.realpath(Dir.mktmpdir)
end

def teardown
FileUtils.remove_entry_secure @dir
FileUtils.remove_entry_secure @dir
super
end
end
Expand Down

0 comments on commit ecaa7a5

Please sign in to comment.