blob: 379e836b7fa8448521627cabf1a4a94539411336 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/*******************************************************************************
* Copyright (c) 2007, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.tests.launching;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.tests.AbstractDebugTest;
/**
* Tests accelerator adjustments for DBCS languages.
* See bug 186921.
*
* @since 3.3
*/
public class AcceleratorSubstitutionTests extends AbstractDebugTest {
/**
* Constructor
* @param name the name of the test
*/
public AcceleratorSubstitutionTests(String name) {
super(name);
}
/**
* tests a string with "..."
*/
public void testWithEllipses() {
assertEquals("incorrect DBCS accelerator substitution", //$NON-NLS-1$
"Open Run Dialog(&R)...", //$NON-NLS-1$
DebugUIPlugin.adjustDBCSAccelerator("Open Run(&R) Dialog...")); //$NON-NLS-1$
}
/**
* tests a string without "..."
*/
public void testWithoutEllipses() {
assertEquals("incorrect DBCS accelerator substitution", //$NON-NLS-1$
"Open Run Dialog(&R)", //$NON-NLS-1$
DebugUIPlugin.adjustDBCSAccelerator("Open Run(&R) Dialog")); //$NON-NLS-1$
}
/**
* tests a string that should not change (no DBCS style accelerator).
*/
public void testWithoutDBCSAcclerator() {
assertEquals("incorrect DBCS accelerator substitution", //$NON-NLS-1$
"Open &Run Dialog...", //$NON-NLS-1$
DebugUIPlugin.adjustDBCSAccelerator("Open &Run Dialog...")); //$NON-NLS-1$
}
}
|