Search in sources :

Example 11 with SpecfileDefine

use of org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine in project linuxtools by eclipse.

the class SpecfileDefineTest method testUnderscoreDefine.

@Test
public void testUnderscoreDefine() {
    SpecfileDefine blahDefine = specfile.getDefine("__find_requires");
    assertEquals(SpecfileDefine.class, blahDefine.getClass());
    assertEquals("__find_requires", blahDefine.getName());
    assertEquals("%{SOURCE3}", blahDefine.getStringValue());
}
Also used : SpecfileDefine(org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine) Test(org.junit.Test)

Example 12 with SpecfileDefine

use of org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine in project linuxtools by eclipse.

the class SpecfileDefineTest method testDefine4.

@Test
public void testDefine4() {
    SpecfileDefine blahDefine = specfile.getDefine("blah4");
    assertEquals(SpecfileDefine.class, blahDefine.getClass());
    assertEquals("blah4", blahDefine.getName());
    assertEquals(1, blahDefine.getIntValue());
}
Also used : SpecfileDefine(org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine) Test(org.junit.Test)

Aggregations

SpecfileDefine (org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine)12 Test (org.junit.Test)7 BadLocationException (org.eclipse.jface.text.BadLocationException)3 Matcher (java.util.regex.Matcher)2 Pattern (java.util.regex.Pattern)2 IDocument (org.eclipse.jface.text.IDocument)2 IRegion (org.eclipse.jface.text.IRegion)2 SpecfileSource (org.eclipse.linuxtools.internal.rpm.ui.editor.parser.SpecfileSource)2 Specfile (org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile)2 SpecfileParser (org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParser)2 StringTokenizer (com.ibm.icu.util.StringTokenizer)1 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Region (org.eclipse.jface.text.Region)1 IHyperlink (org.eclipse.jface.text.hyperlink.IHyperlink)1 IAnnotationModel (org.eclipse.jface.text.source.IAnnotationModel)1 SpecfileEditor (org.eclipse.linuxtools.internal.rpm.ui.editor.SpecfileEditor)1 SpecfileElementHyperlink (org.eclipse.linuxtools.internal.rpm.ui.editor.hyperlink.SpecfileElementHyperlink)1 SpecfileElementHyperlinkDetector (org.eclipse.linuxtools.internal.rpm.ui.editor.hyperlink.SpecfileElementHyperlinkDetector)1