# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
# E2e tests for category: code
defmodule E2e.CodeTest do
  use ExUnit.Case, async: false

  describe "code_shebang_detection" do
    test "code_shebang_detection" do
      {:ok, result} = Kreuzberg.extract_file_sync("../../test_documents/code/script.sh", mime_type: "text/x-source-code")
      assert String.trim(result.mime_type) == "text/x-source-code"
      assert (is_binary(result.content) && byte_size(result.content) >= 10) || (is_list(result.content) && length(result.content) >= 10) || (is_binary(result.content) == false && is_list(result.content) == false && String.length(result.content) >= 10)
      assert String.contains?(to_string(result.content), "build")
      assert String.contains?(to_string(result.content), "clean")
    end
  end
end
