Path: blob/master/test/functional/cmdLineTests/shareClassTests/SCCommandLineOptionTests/nameOption15.pl
6004 views
#1# Copyright (c) 2009, 2019 IBM Corp. and others2#3# This program and the accompanying materials are made available under4# the terms of the Eclipse Public License 2.0 which accompanies this5# distribution and is available at https://www.eclipse.org/legal/epl-2.0/6# or the Apache License, Version 2.0 which accompanies this distribution and7# is available at https://www.apache.org/licenses/LICENSE-2.0.8#9# This Source Code may also be made available under the following10# Secondary Licenses when the conditions for such availability set11# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12# General Public License, version 2 with the GNU Classpath13# Exception [1] and GNU General Public License, version 2 with the14# OpenJDK Assembly Exception [2].15#16# [1] https://www.gnu.org/software/classpath/license.html17# [2] http://openjdk.java.net/legal/assembly-exception.html18#19# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20#2122# @test 1.023# @outputpassed24# @author Radhakrishnan Thangamuthu25# @summary check if a cache can be created with maximum allowed length26# @summary and that the destroy command works. The cache name used for27# @summary testing contains %g.2829use lib ".";30require "sharedClassesUtil.pl";3132use strict;33use warnings;3435sub nameOption15test{36my ($java_exe,$cache_max_len_string)=@_;37my $test_name = "nameOption15";3839my $append_token=get_short_string_for_group();40# expanded_token contains the expansion of chars stored in append_token41my $expanded_token="";4243if (is_windows_OS( )){44my $error_msg = "Escape character g not valid for cache name";45$expanded_token= " "; # dummy string with the same length as append_token46long_cache_name_fail_cases_test($java_exe, $test_name, $cache_max_len_string, $error_msg,47$append_token, $expanded_token);48}else {49my $group_name=get_group_name();50$expanded_token = $group_name;51cache_name_with_fixed_length_test($java_exe, $test_name, $cache_max_len_string, $append_token,52$expanded_token);53}54}5556nameOption15test((@ARGV));575859