diff --git a/test/suite/ch13/13.0/13_4-17gs.js b/test/suite/ch13/13.0/13_4-17gs.js index 67acccecea..2d82271719 100644 --- a/test/suite/ch13/13.0/13_4-17gs.js +++ b/test/suite/ch13/13.0/13_4-17gs.js @@ -1,4 +1,22 @@ - +/// Copyright (c) 2011 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** * @path ch13/13.0/13_4-17gs.js diff --git a/test/suite/ch13/13.0/13_4-5gs.js b/test/suite/ch13/13.0/13_4-5gs.js index 2fa29eb7c1..e648c35b6b 100644 --- a/test/suite/ch13/13.0/13_4-5gs.js +++ b/test/suite/ch13/13.0/13_4-5gs.js @@ -1,4 +1,22 @@ - +/// Copyright (c) 2011 Microsoft Corporation +/// +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided +/// that the following conditions are met: +/// * Redistributions of source code must retain the above copyright notice, this list of conditions and +/// the following disclaimer. +/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +/// the following disclaimer in the documentation and/or other materials provided with the distribution. +/// * Neither the name of Microsoft nor the names of its contributors may be used to +/// endorse or promote products derived from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** * @path ch13/13.0/13_4-5gs.js diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js b/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js index 1afeca76be..152952407e 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js @@ -1,11 +1,10 @@ - +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /** * @path ch15/15.2/15.2.3/15.2.3.1/S15.2.3.1_A3.js */ - // Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. /** * @name: S15.2.3.1_A3; diff --git a/tools/misc/AddLicenseHeader.py b/tools/misc/AddLicenseHeader.py index 83d40a83a0..1d49f88f53 100644 --- a/tools/misc/AddLicenseHeader.py +++ b/tools/misc/AddLicenseHeader.py @@ -46,15 +46,17 @@ MSFT_LICENSE = '''/// Copyright (c) 2012 Microsoft Corporation /// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' -GOOGLE_LICENSE = '''// Copyright 2009 the Sputnik authors. All rights reserved. +GOOGLE_LICENSE = '''// Copyright 2011 Google Inc. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. ''' -SPUTNIK_RE = re.compile(r"[\\/]S(bp)?[0-9]+\.[^\\/]+\.js$") -SPUTNIK_LINE_ONE = "the Sputnik authors" +GOOGLE_RE = re.compile(r"[\\/]S([0-9]+)|(bp)(\.|_)[^\\/]+\.js$") +GOOGLE_LINE_ONE = re.compile(r"(Copyright\s+20[0-9][0-9]\s+Google)|(the Sputnik authors)") IETC_RE = re.compile(r"[\\/][0-9]+\.[^\\/]+\.js$") -IETC_LINE_ONE = "Microsoft Corporation" +IETC_LINE_ONE = re.compile(r"Microsoft Corporation") + + #------------------------------------------------------------------------------ def getAllJSFiles(dirName): @@ -80,10 +82,10 @@ def handleFile(filePath): origLines = f.readlines() #Figure out which license header we'll be using - #if SPUTNIK_RE.search(filePath)!=None: - # licenseHeader = GOOGLE_LICENSE - # lineOne = SPUTNIK_LINE_ONE - if IETC_RE.search(filePath)!=None: + if GOOGLE_RE.search(filePath)!=None: + licenseHeader = GOOGLE_LICENSE + lineOne = GOOGLE_LINE_ONE + elif IETC_RE.search(filePath)!=None: licenseHeader = MSFT_LICENSE lineOne = IETC_LINE_ONE else: @@ -91,7 +93,7 @@ def handleFile(filePath): return #See if it's already there - if lineOne in origLines[0]: + if lineOne.search(origLines[0])!=None: return with open(filePath, "wb") as f: