require "spec_helper" RSpec.describe IsoDoc do it "processes IsoXML terms" do expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT" Terms and Definitions paddy rice

rice retaining its husk after threshing

Foreign seeds, husks, bran, sand, dust.

  • A
  • A
3.1

The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here

paddypaddy rice rough rice cargo rice

rice retaining its husk after threshing

  • A

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

  • A

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

3.1
INPUT #{HTML_HDR}

1.  Terms and definitions

For the purposes of this document, the following terms and definitions apply.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

1.1

paddy

<rice> rice retaining its husk after threshing

EXAMPLE 1

Foreign seeds, husks, bran, sand, dust.

  • A
EXAMPLE 2
  • A

[TERMREF] ISO 7301:2011, 3.1 [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here [/TERMREF]

1.2

paddy

paddy rice

rough rice

DEPRECATED: cargo rice

rice retaining its husk after threshing

EXAMPLE
  • A

Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

Note 2 to entry:

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

[TERMREF] ISO 7301:2011, 3.1 [/TERMREF]

OUTPUT end it "processes IsoXML terms (Word)" do expect(IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{^.*

}m, "")).to be_equivalent_to <<~"OUTPUT" Terms and Definitions paddy rice

rice retaining its husk after threshing

Foreign seeds, husks, bran, sand, dust.

3.1

The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here

paddypaddy rice rough rice cargo rice

rice retaining its husk after threshing

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

3.1
INPUT

1.  Terms and definitions

For the purposes of this document, the following terms and definitions apply.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

1.1

paddy

<rice> rice retaining its husk after threshing

EXAMPLE 1

Foreign seeds, husks, bran, sand, dust.

  • A
EXAMPLE 2
  • A

[TERMREF] ISO 7301:2011, 3.1 [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here [/TERMREF]

1.2

paddy

paddy rice

rough rice

DEPRECATED: cargo rice

rice retaining its husk after threshing

EXAMPLE
  • A

Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

Note 2 to entry:

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

[TERMREF] ISO 7301:2011, 3.1 [/TERMREF]


OUTPUT end end