mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-28 21:01:00 +00:00
@@ -916,6 +916,14 @@ Perl:
|
|||||||
- .psgi
|
- .psgi
|
||||||
- .t
|
- .t
|
||||||
|
|
||||||
|
Pike:
|
||||||
|
type: programming
|
||||||
|
color: "#066ab2"
|
||||||
|
lexer: C
|
||||||
|
primary_extension: .pike
|
||||||
|
extensions:
|
||||||
|
- .pmod
|
||||||
|
|
||||||
PowerShell:
|
PowerShell:
|
||||||
type: programming
|
type: programming
|
||||||
ace_mode: powershell
|
ace_mode: powershell
|
||||||
|
|||||||
22
test/fixtures/rsif.pike
vendored
Executable file
22
test/fixtures/rsif.pike
vendored
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#! /usr/bin/env pike
|
||||||
|
// -*- pike -*- $Id$
|
||||||
|
#pike __REAL_VERSION__
|
||||||
|
|
||||||
|
inherit Tools.Standalone.process_files;
|
||||||
|
string version = ("$Revision$"/" ")[1];
|
||||||
|
string description = "Replaces strings in files.";
|
||||||
|
string usage = #"[options] <from> <to> <files>
|
||||||
|
|
||||||
|
rsif (\"replace string in file\") replaces all occurrences of the
|
||||||
|
string <from> with the string <to> in listed files. The name of the
|
||||||
|
files that were changed are written to stdout. Directories may be
|
||||||
|
given instead of files, in which case all the files in that directory
|
||||||
|
will be processed. Available options:
|
||||||
|
" + default_flag_docs;
|
||||||
|
|
||||||
|
int want_args = 2;
|
||||||
|
|
||||||
|
string process( string input, string from, string to ) {
|
||||||
|
if( has_value( input, from ) )
|
||||||
|
return replace( input, from, to );
|
||||||
|
}
|
||||||
@@ -444,6 +444,9 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
|
|
||||||
# XML
|
# XML
|
||||||
assert_equal Language['XSLT'], blob("test.xslt").language
|
assert_equal Language['XSLT'], blob("test.xslt").language
|
||||||
|
|
||||||
|
# Pike: http://pike.ida.liu.se/
|
||||||
|
assert_equal Language['Pike'], blob("rsif.pike").language
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_lexer
|
def test_lexer
|
||||||
|
|||||||
Reference in New Issue
Block a user