[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 050fb91d40ea0cdc84b3118d9f26f93cadfa21c3

Ville Skyttä ville.skytta at iki.fi
Sat Jan 30 10:27:22 UTC 2010


The following commit has been merged in the master branch:
commit 050fb91d40ea0cdc84b3118d9f26f93cadfa21c3
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Jan 30 12:25:13 2010 +0200

    (testsuite) Add some java classpath tests.

diff --git a/test/fixture1/bar b/test/fixtures/java/a/b$c.class
similarity index 100%
copy from test/fixture1/bar
copy to test/fixtures/java/a/b$c.class
diff --git a/test/fixture1/bar b/test/fixtures/java/a/b.class
similarity index 100%
copy from test/fixture1/bar
copy to test/fixtures/java/a/b.class
diff --git a/test/fixtures/java/a/c/README.txt b/test/fixtures/java/a/c/README.txt
new file mode 100644
index 0000000..e5e6d0b
--- /dev/null
+++ b/test/fixtures/java/a/c/README.txt
@@ -0,0 +1,2 @@
+When CLASSPATH is set to the fixtures/java/a dir, we do *not* expect
+*.class in subdirs to be included in completions, see Debian bug #496828.
diff --git a/test/fixture1/bar b/test/fixtures/java/a/c/d.class
similarity index 100%
copy from test/fixture1/bar
copy to test/fixtures/java/a/c/d.class
diff --git a/test/fixture1/bar b/test/fixtures/java/a/d.txt
similarity index 100%
copy from test/fixture1/bar
copy to test/fixtures/java/a/d.txt
diff --git a/test/fixtures/java/bashcomp.jar b/test/fixtures/java/bashcomp.jar
new file mode 100644
index 0000000..d9c2779
Binary files /dev/null and b/test/fixtures/java/bashcomp.jar differ
diff --git a/test/lib/completions/java.exp b/test/lib/completions/java.exp
index f14d84a..bc0b481 100644
--- a/test/lib/completions/java.exp
+++ b/test/lib/completions/java.exp
@@ -1,4 +1,5 @@
 proc setup {} {
+    assert_bash_exec {CLASSPATH=$TESTDIR/fixtures/java/a:$TESTDIR/fixtures/java/bashcomp.jar}
     save_env
 }; # setup()
 
@@ -17,4 +18,23 @@ assert_complete_any "java -"
 sync_after_int
 
 
+assert_complete "b bashcomp.jarred toplevel" "java "
+
+
+sync_after_int
+
+
+assert_complete "bashcomp.jarred toplevel" \
+    "java -cp $TESTDIR/fixtures/java/bashcomp.jar "
+
+
+sync_after_int
+
+
+assert_no_complete "java -cp \"\" "
+
+
+sync_after_int
+
+
 teardown

-- 
bash-completion



More information about the Bash-completion-commits mailing list