Add a test showing we are not handling exports flags properly.
This commit is contained in:
parent
a548c7e170
commit
1ab7d2f2d7
7
Makefile
7
Makefile
@ -46,6 +46,13 @@ dockertest:
|
|||||||
> $(MAKE) -C docker/organic_test
|
> $(MAKE) -C docker/organic_test
|
||||||
> docker run --init --rm -i -t --read-only -v "$$(readlink -f ./):/source:ro" --mount type=tmpfs,destination=/tmp --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test --no-default-features --features compare --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
|
> docker run --init --rm -i -t --read-only -v "$$(readlink -f ./):/source:ro" --mount type=tmpfs,destination=/tmp --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test --no-default-features --features compare --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
|
||||||
|
|
||||||
|
.PHONY: buildtest
|
||||||
|
buildtest:
|
||||||
|
> cargo build --no-default-features
|
||||||
|
> cargo build --no-default-features --features compare
|
||||||
|
> cargo build --no-default-features --features tracing
|
||||||
|
> cargo build --no-default-features --features compare,tracing
|
||||||
|
|
||||||
.PHONY: foreign_document_test
|
.PHONY: foreign_document_test
|
||||||
foreign_document_test:
|
foreign_document_test:
|
||||||
> $(MAKE) -C docker/organic_test run_foreign_document_test
|
> $(MAKE) -C docker/organic_test run_foreign_document_test
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
#+begin_example python :exports results
|
||||||
|
print("foo")
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
#+begin_example python -n :exports results
|
||||||
|
print("foo")
|
||||||
|
#+end_example
|
@ -0,0 +1,7 @@
|
|||||||
|
#+begin_src python :exports results
|
||||||
|
print("foo")
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src python -n :exports results
|
||||||
|
print("foo")
|
||||||
|
#+end_src
|
@ -104,7 +104,7 @@ pub(crate) fn comment_block<'b, 'g, 'r, 's>(
|
|||||||
context: RefContext<'b, 'g, 'r, 's>,
|
context: RefContext<'b, 'g, 'r, 's>,
|
||||||
input: OrgSource<'s>,
|
input: OrgSource<'s>,
|
||||||
) -> Res<OrgSource<'s>, CommentBlock<'s>> {
|
) -> Res<OrgSource<'s>, CommentBlock<'s>> {
|
||||||
let (remaining, name) = lesser_block_begin("comment")(context, input)?;
|
let (remaining, _name) = lesser_block_begin("comment")(context, input)?;
|
||||||
let (remaining, _parameters) = opt(tuple((space1, data)))(remaining)?;
|
let (remaining, _parameters) = opt(tuple((space1, data)))(remaining)?;
|
||||||
let (remaining, _nl) = recognize(tuple((space0, line_ending)))(remaining)?;
|
let (remaining, _nl) = recognize(tuple((space0, line_ending)))(remaining)?;
|
||||||
let lesser_block_end_specialized = lesser_block_end("comment");
|
let lesser_block_end_specialized = lesser_block_end("comment");
|
||||||
@ -128,7 +128,6 @@ pub(crate) fn comment_block<'b, 'g, 'r, 's>(
|
|||||||
remaining,
|
remaining,
|
||||||
CommentBlock {
|
CommentBlock {
|
||||||
source: source.into(),
|
source: source.into(),
|
||||||
name: name.into(),
|
|
||||||
contents: contents.into(),
|
contents: contents.into(),
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
@ -384,7 +383,6 @@ fn example_switches<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, ExampleSrcSw
|
|||||||
Ok((remaining, switches))
|
Ok((remaining, switches))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
|
||||||
fn example_src_switches(
|
fn example_src_switches(
|
||||||
grab_language: bool,
|
grab_language: bool,
|
||||||
) -> impl for<'s> Fn(OrgSource<'s>) -> Res<OrgSource<'s>, ExampleSrcSwitches<'s>> {
|
) -> impl for<'s> Fn(OrgSource<'s>) -> Res<OrgSource<'s>, ExampleSrcSwitches<'s>> {
|
||||||
|
@ -32,7 +32,6 @@ pub struct VerseBlock<'s> {
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct CommentBlock<'s> {
|
pub struct CommentBlock<'s> {
|
||||||
pub source: &'s str,
|
pub source: &'s str,
|
||||||
pub name: &'s str,
|
|
||||||
pub contents: &'s str,
|
pub contents: &'s str,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user