Commit Graph

35 Commits

Author SHA1 Message Date
Paul Chaignon
0bf4b8a482 Remove samples/LANG/filenames as a source of truth (#4078)
All filenames must now be explicitly listed in languages.yml. A test
makes sure they are.
2018-04-02 11:09:06 +02:00
Arfon Smith
b72c4d4400 Fix Ruby deprecation warning 2016-03-18 16:47:09 -06:00
Brandon Keepers
8a42f76f03 Remove .script! hack 2015-04-17 14:09:05 +12:00
Paul Chaignon
41e1b7bd4e Detection by extension made case-insensitive 2015-02-06 22:14:22 +01:00
Adam Roben
1f1ffcbfa6 Merge pull request #1930 from github/minitest
Switch to Minitest::Test instead of Test::Unit::TestCase
2015-01-02 16:27:43 -05:00
Lars Brinkhoff
6ae39e50ae Fix #1731 to allow samples with multiple file extension segments. 2015-01-02 10:41:22 -05:00
Adam Roben
65296e86a3 Switch to Minitest::Test instead of Test::Unit::TestCase
This gives us a consistent test framework across all Ruby versions which
should help avoid errors that are only found when CI runs the tests on
different Rubies. (And this fixes an immediate bug where there's no
`skip` method in the version of test-unit we're currently using only on
Ruby 2.2.)
2014-12-31 15:26:26 -05:00
Brandon Keepers
434ab9f2c0 Add tests for shebangs 2014-11-27 13:09:05 -05:00
Brandon Keepers
5b41ab4774 Fix typo in test 2014-11-26 15:40:51 -05:00
Brandon Keepers
ce31e23006 Merge remote-tracking branch 'origin/master' into interpreters-in-samples
* origin/master: (30 commits)
  Add byebug
  Link to Lightshow in CONTRIBUTING.md
  Switch to a better F# grammar
  Bump Rugged again
  Checkout the master for testing
  Rugged 0.22.0b3
  Reordering
  Bump version to 4.0.3
  Add some docs for tm_scope
  Change NONE to none
  Checking other case for Chart.jS
  Test that all languages have grammars
  Fix RHTML's tm_scope
  Chart JS is vendored
  Switch to a better grammar for Bro
  reorder again…
  put cjsx at the top
  Use a SQF grammar for SQF files
  move cjsx before iced
  move cjsx before iced
  ...

Conflicts:
	lib/linguist/languages.yml
2014-11-26 15:17:08 -05:00
Brandon Keepers
9823af0cb4 Fix for shebang with relative bin
`#!/usr/bin/env bin/linguist` is a valid shebang
2014-11-20 12:50:35 -05:00
Brandon Keepers
2670e2b035 Test that interpreters are defined in languages.yml 2014-11-20 11:21:52 -05:00
Brandon Keepers
eccea65641 Fix for interpreters not getting add to samples.json 2014-11-20 11:14:05 -05:00
Brandon Keepers
245a1a92cf Merge remote-tracking branch 'origin/master' into test-helper
* origin/master:
  Add Gemfile.lock sample
  Remove deprecated method
  #all_extensions already includes primary extension
  typo
  remove unused assertion
  Symlink ant.xml to build.xml
  Avoid shadowing variable name
  Update comment
  Make missing sample failure message similar
  Remove blank extensions property
  Fix sample tests
  Add Forth extensions .f and .for; add heuristics for Forth and FORTRAN.
  Add FORTRAN and Forth samples.
  Extensions aren't actually required
  Fix errors from pedantic test
  Make pedantic test actually pedantic
  Removing extensions when they should be filenames
  Adding sample pom.xml files
  Link to contributing docs
  require samples if filename matches multiple languages

Conflicts:
	test/test_pedantic.rb
2014-11-18 16:48:26 -05:00
Brandon Keepers
aa7ab2065b Add test helper to make test env consistent 2014-11-18 16:46:09 -05:00
Brandon Keepers
850ab6dedb #all_extensions already includes primary extension 2014-11-18 15:10:07 -05:00
Brandon Keepers
b20fa497b9 typo 2014-11-18 15:07:36 -05:00
Brandon Keepers
1abc7ee2ef remove unused assertion 2014-11-18 15:04:12 -05:00
Brandon Keepers
587c764950 Avoid shadowing variable name 2014-11-18 14:57:39 -05:00
Brandon Keepers
1abbcb6435 Update comment 2014-11-18 14:57:32 -05:00
Brandon Keepers
17f3d7005a Make missing sample failure message similar 2014-11-18 14:55:15 -05:00
Brandon Keepers
ba8b55391d Fix sample tests 2014-11-18 14:48:21 -05:00
Brandon Keepers
07a6411a75 Link to contributing docs 2014-11-17 16:30:39 -05:00
Brandon Keepers
b32bc5ef47 require samples if filename matches multiple languages 2014-11-17 16:18:56 -05:00
Brandon Keepers
cd743332f4 Use yajl since it is already a dependency
Both JSON and Yajl were listed as dependencies. Pygments.rb already requires yajl, so let's just use that instead of using both.
2014-10-17 14:45:28 -04:00
Brandon Keepers
015af19eaf Move Samples::DATA constant to Samples.cache method 2014-09-16 10:25:30 -04:00
Arfon Smith
43923976c2 Adding test to check that languages.yml includes all extensions represented in samples folder 2014-08-11 14:16:25 -07:00
Arfon Smith
cec5942d6b Removing extra . 2014-04-22 22:09:30 -05:00
Arfon Smith
152e3ace99 Adding all_extensions method to Language 2014-04-22 16:56:27 -05:00
Arfon Smith
64b6f18e66 Adding debugging for failed assertions 2014-04-22 16:53:42 -05:00
Arfon Smith
be1003648a Removing pry 2014-04-22 15:48:57 -05:00
Arfon Smith
536800f9f5 Towards testing for presence of sample files 2014-04-22 15:47:49 -05:00
richo
2d7dea2d97 Don't emit the diff if samples db is out of date
There's a warning message emitted with instructions, a 2000 line diff
does nothing to help the user track down the issue.
2013-03-13 17:29:05 +11:00
Joshua Peek
10e875e899 Print out samples db diffs 2012-09-24 10:07:08 -05:00
Joshua Peek
5cda67530d Seperate test file for samples 2012-07-23 13:55:30 -05:00