aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-04-30 15:38:43 +0000
committerGravatar John Field <jfield@google.com>2015-04-30 18:45:37 +0000
commit1373653f6d4903963abdd5daceabf3193fa240f4 (patch)
treeb9c2fbceae2af445f4cffe87ce03184adbdd8b78 /src/test
parent6d9fb360b79ec040e423b20b72a9cc3c4bac5b54 (diff)
Don't allow launching from a directory with a space in the name
Further improvements on #167. -- MOS_MIGRATED_REVID=92459390
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/workspace_path_test.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/shell/bazel/workspace_path_test.sh b/src/test/shell/bazel/workspace_path_test.sh
new file mode 100755
index 0000000000..ae76bc325b
--- /dev/null
+++ b/src/test/shell/bazel/workspace_path_test.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# Copyright 2015 Google Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Load test environment
+source $(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/test-setup.sh \
+ || { echo "test-setup.sh not found!" >&2; exit 1; }
+
+function test_path_with_spaces() {
+ ws="a b"
+ mkdir "$ws"
+ cd "$ws"
+ touch WORKSPACE
+
+ bazel info &> $TEST_log && fail "Info succeeeded"
+ bazel help &> $TEST_log || fail "Help failed"
+}
+
+run_suite "workspace tests"