| Index: appengine/chromium_rietveld/new_static/diff/diff_parser_tests.js
|
| diff --git a/appengine/chromium_rietveld/new_static/diff/diff_parser_tests.js b/appengine/chromium_rietveld/new_static/diff/diff_parser_tests.js
|
| index cf12a03b72dc8ae689119ed97891109c1aec7aad..8e777b6eba45dfc3dc9bc4abf3dcd2a4a522ab7e 100644
|
| --- a/appengine/chromium_rietveld/new_static/diff/diff_parser_tests.js
|
| +++ b/appengine/chromium_rietveld/new_static/diff/diff_parser_tests.js
|
| @@ -5,6 +5,16 @@
|
| "use strict";
|
|
|
| describe("DiffParser", function() {
|
| + it("should detect image file names", function() {
|
| + expect(DiffParser.isImageFile("foo.png")).toBeTruthy();
|
| + expect(DiffParser.isImageFile("foo.bar.jpeg")).toBeTruthy();
|
| + expect(DiffParser.isImageFile("foo(baz).jpg")).toBeTruthy();
|
| + expect(DiffParser.isImageFile("_foo_.webp")).toBeTruthy();
|
| + expect(DiffParser.isImageFile("example-file-name.bmp")).toBeTruthy();
|
| + expect(DiffParser.isImageFile("is a. gif.gif")).toBeTruthy();
|
| + expect(DiffParser.isImageFile(".gif")).toBeFalsy();
|
| + expect(DiffParser.isImageFile("not a gif.gif.txt")).toBeFalsy();
|
| + });
|
| it("should not show context link for file deletes", function() {
|
| var text =
|
| "Index: example.cc\n" +
|
|
|