From 88847fe53ab2e97e7ba7ec8f2afc056fb29b0a70 Mon Sep 17 00:00:00 2001 From: jrburke Date: Sun, 17 Oct 2010 19:31:27 -0700 Subject: [PATCH] Fix bone-headed regexp mistake, and add test so I do not do it again. --- require.js | 2 +- testBaseUrl.js | 11 +++++++++++ tests/all.js | 1 + tests/baseUrl.html | 14 ++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 testBaseUrl.js create mode 100644 tests/baseUrl.html diff --git a/require.js b/require.js index e27ec53d7..99b54ba80 100644 --- a/require.js +++ b/require.js @@ -1579,7 +1579,7 @@ var require, define; //>>excludeStart("dojoConvert", pragmas.dojoConvert); //>>excludeStart("jquery", pragmas.jquery); - rePkg = /allplugins-?require\.js(\W|$)/i; + rePkg = /(allplugins-)?require\.js(\W|$)/i; //>>excludeEnd("jquery"); //>>excludeEnd("dojoConvert"); diff --git a/testBaseUrl.js b/testBaseUrl.js new file mode 100644 index 000000000..cdae0a3e9 --- /dev/null +++ b/testBaseUrl.js @@ -0,0 +1,11 @@ +define(function() { + doh.register( + "testBaseUrl", + [ + function testBaseUrl(t){ + t.is(true, true); + } + ] + ); + doh.run(); +}); \ No newline at end of file diff --git a/tests/all.js b/tests/all.js index 1684bfc57..6fc8a2804 100644 --- a/tests/all.js +++ b/tests/all.js @@ -1,4 +1,5 @@ doh.registerUrl("simple", "../simple.html"); +doh.registerUrl("baseUrl", "../baseUrl.html"); doh.registerUrl("config", "../config.html"); doh.registerUrl("dataMain", "../dataMain.html"); doh.registerUrl("anonSimple", "../anon/anonSimple.html"); diff --git a/tests/baseUrl.html b/tests/baseUrl.html new file mode 100644 index 000000000..5cf615d0f --- /dev/null +++ b/tests/baseUrl.html @@ -0,0 +1,14 @@ + + + + Default baseUrl Test + + + + + +

require.js: Default baseUrl Test

+

Test for usage of text! require plugin. +

Check console for messages

+ +