Skip to content

Commit e094c30

Browse files
committed
WIP: potential failing test
The implementation we chose right now means that there is a situation where an explicit ignore in your `.gitignore` file could now be included due to the fix we implemented. We can always add an additional `@source not` on top of everything, but ideally this is not needed at all.
1 parent c47384e commit e094c30

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

crates/oxide/tests/scanner.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,17 @@ mod scanner {
319319
globs,
320320
normalized_sources,
321321
..
322-
} = scan(&[("some.pages/index.html", "content-['some.pages/index.html']")]);
322+
} = scan(&[
323+
// Looks like `.pages` binary extension, but it's a folder
324+
("some.pages/index.html", "content-['some.pages/index.html']"),
325+
// Ignore a specific folder. This is to ensure that this still "wins" from the internal
326+
// solution of dealing with binary extensions for files only.
327+
(".gitignore", "other.pages"),
328+
(
329+
"other.pages/index.html",
330+
"content-['other.pages/index.html']",
331+
),
332+
]);
323333

324334
assert_eq!(files, vec!["some.pages/index.html"]);
325335
assert_eq!(globs, vec!["*", "some.pages/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}"]);

0 commit comments

Comments
 (0)