Commit Graph
41 Commits
Author SHA1 Message Date
Peter Darton 94efc7ba6a Improved unit test for Util.deleteFile(File)
Added unit test for Util.deleteRecursive(File)
2015-08-17 07:14:47 +02:00
Stephen Connolly 1cb69f8cc0 Move isRelativePath to Util and use from hudson.model.Slave's descriptor 2015-03-19 13:56:38 +00:00
René Scheibe bd1d6251e0 replace all deprecated @Bug annotations with @Issue 2015-01-07 17:12:21 +01:00
Jesse Glick b415b467fb Replacing Util.createTempDir with the standard TemporaryFolder rule in some tests. 2014-12-17 15:04:45 -05:00
Daniel Beck daacb02057 [JENKINS-16184] Also escape greater-than character 2014-10-09 00:38:22 +02:00
Larry North 3376cf0158 [FIXED JENKINS-16660] Allow variable names with dots in bracketed references.
Given these <variable,value> mappings: <A,a> and <A.B,a-b>, $A.B would
evaluate to $a.B, as it currently does, and ${A.B} to a-b instead of the
current ${A.B}.

Existing ${A.B}-like references will break (not evaluate to ${A.B}) if
there actually is an A.B variable defined, which I think is very
unlikely.
2013-07-26 21:15:51 -07:00
Oliver Gondža b8a580c9b3 Add unittests for Util.loadProperties 2013-07-09 16:59:31 +02:00
Jesse Glick 78b263421f [FIXED JENKINS-17271] Util.deleteFile should give a concrete reason for failure. 2013-03-19 11:05:21 -04:00
Jesse Glick 400fa878e6 Verifying that symlink target may be absolute. 2013-03-08 18:55:49 -05:00
Vojtech Juranek 9993468ce4 Merge branch 'revert-ampersand-encoding' of https://github.com/lvotypko/jenkins into pull683
Conflicts:
	core/src/test/java/hudson/UtilTest.java
2013-02-27 15:33:31 +01:00
lvotypko 3d568123f3 Revert changes which broke backwad compatibility based on discussion in jenkins-dev list 2013-01-29 15:51:16 +01:00
Kohsuke Kawaguchi d32f9e5113 merged back the RC branch 2012-11-18 17:59:10 -08:00
Kohsuke Kawaguchi 68e84726ab [FIXED SECURITY-45] 2012-11-17 12:02:49 -08:00
Jesse Glick 0552f5ad75 [JENKINS-13202] 646154f refinement: resolveSymlink is documented to return null, not throw an exception, when called on a regular file. 2012-11-16 13:41:22 -05:00
Christoph Kutzinski 6934aa9ee9 Remove usage of deprecated API 2012-09-09 17:52:59 +02:00
Christoph Kutzinski d5017813ec Converting to JUnit 4 thus fixing [JENKINS-14641] and also fixing test(Html)Escape which didn't ran previously because of wrong case 2012-08-26 23:25:13 +02:00
lvotypko c667523d44 Fix UtilTest and replace ampersand in method encode too 2012-06-13 13:17:19 +02:00
Christoph Kutzinski 181d7dab54 Create unit test for Util.isSymlink [JENKINS-12331] 2012-01-08 12:54:05 +01:00
Christoph Kutzinski 3c09a0c43a [FIXED JENKINS-10346] thread-safety problem when computing fingerprints 2011-07-16 13:55:23 +01:00
Seiji Sogabe eeeda9eea8 [FIXED HUDSON-8270] escape quotes. 2010-12-28 23:44:39 +09:00
mindless da9acc9705 remove workaround to rerun testSymlink with shorter link for S10,
and instead add (char) cast so original test uses right length for name.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29990 71c3de6d-444a-0410-be80-ed276b4c234a
2010-04-12 19:45:13 +00:00
mindless 007ce08a1c oops, typo in last commit
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28506 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-10 23:51:19 +00:00
mindless c79a4b0cea fix symlink test with long filename (got ENAMETOOLONG on Solaris 10)..
if "ln failed: 78" is logged, try again with shorter name.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28505 71c3de6d-444a-0410-be80-ed276b4c234a
2010-03-10 23:34:47 +00:00
kohsuke 2676adca52 class initialization of Hudson is much more work than that of Util, so pushing these small utilities out to Util to reduce the overhead of remoting.
Plus it helps to keep Hudson.java smaller

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@27448 71c3de6d-444a-0410-be80-ed276b4c234a
2010-02-13 01:30:56 +00:00
sogabe 951ccc5d8d fixed test failure. \u00E9 should encoded into %C3%A9, not %C3%A9%00
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@26002 71c3de6d-444a-0410-be80-ed276b4c234a
2010-01-17 00:25:20 +00:00
kohsuke 52066f6440 added symlink resolution code
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24373 71c3de6d-444a-0410-be80-ed276b4c234a
2009-12-03 14:15:46 +00:00
kohsuke b73f620e88 more test case
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23546 71c3de6d-444a-0410-be80-ed276b4c234a
2009-11-06 22:26:13 +00:00
kohsuke 1a1d0d74d5 license header clean up
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15081 71c3de6d-444a-0410-be80-ed276b4c234a
2009-02-06 20:05:24 +00:00
mindless b656cd8567 [FIXED HUDSON-2843] Util.getTimeSpanString() got exception for times <10 sec
on locales with comma as fraction separator.  Now passing time value to localizer
as float instead of String.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14480 71c3de6d-444a-0410-be80-ed276b4c234a
2009-01-14 18:03:38 +00:00
kohsuke 759d4d90d2 Hudson renders durations in milliseconds if the total duration is very short.
(<a href="http://www.nabble.com/Unit-tests-duration-in-milliseconds-tt21417767.html">report</a>)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14409 71c3de6d-444a-0410-be80-ed276b4c234a
2009-01-13 01:11:49 +00:00
mindless 044c4ad122 [FIXED HUDSON-2793] Fix from HUDSON-2379 introduced a bug for artifact/workspace
filenames with spaces.
- Added new Util.rawEncode which encodes the right set of characters (based on
  RFC1738) and deprecated Util.encode which only encodes non-ASCII.  Unit test too.
- Change previous fix to use Util.rawEncode instead of URLEncoder.encode
- New fix: add h.xmlEscape call for each displayed filename in artifacts/workspace
  so & and < are encoded for HTML display
- Add all these fixes in Run/artifacts-index.jelly which wasn't included before


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14355 71c3de6d-444a-0410-be80-ed276b4c234a
2009-01-11 01:58:47 +00:00
kohsuke 86d5b5e691 Applied a patch given in http://www.nabble.com/-PATCH--Util.replaceMacro-td20526461.html
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13281 71c3de6d-444a-0410-be80-ed276b4c234a
2008-11-17 18:34:44 +00:00
redsolo 6317d1e158 [fixed] More help when configuring new slaves (issue #1530)
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8991 71c3de6d-444a-0410-be80-ed276b4c234a
2008-05-01 08:55:26 +00:00
dwdyer 8a4b77e4b9 Fix for ISSUE#909 (encode spaces in URLs sent by Jabber bot).
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8938 71c3de6d-444a-0410-be80-ed276b4c234a
2008-04-28 21:18:40 +00:00
cactusman e30738e513 Fixed i18n time's suffix.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7160 71c3de6d-444a-0410-be80-ed276b4c234a
2008-02-19 12:11:18 +00:00
cactusman f326aae8b5 Fixed degrade i18n's testcase for time span.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7142 71c3de6d-444a-0410-be80-ed276b4c234a
2008-02-17 02:26:16 +00:00
cactusman f12d71c8e3 Fixed degrade i18n for time span.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7134 71c3de6d-444a-0410-be80-ed276b4c234a
2008-02-15 02:33:34 +00:00
dwdyer 9194bc32f0 Fix for ISSUE#1160 (make duration descriptions more accurate). The rules for the descriptions are as outlined in this thread: http://www.nabble.com/More-precise-time-strings-tt14781235.html
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6879 71c3de6d-444a-0410-be80-ed276b4c234a
2008-01-25 20:20:44 +00:00
kohsuke 024f517287 Macro expansion rule now supports ${ABC} syntax as well as $ABC.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4907 71c3de6d-444a-0410-be80-ed276b4c234a
2007-09-23 18:22:38 +00:00
rbair ecdb521b5e Updated the test to include more complex scenarios
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2205 71c3de6d-444a-0410-be80-ed276b4c234a
2007-02-13 16:21:47 +00:00
kohsuke d9184ad871 added code to handle macro expansion.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1166 71c3de6d-444a-0410-be80-ed276b4c234a
2006-11-18 17:52:04 +00:00